Skip to content

Commit

Permalink
Fix API prefix to fetch Swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Goutay committed Jul 21, 2016
1 parent de12cf2 commit 5d0febc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flasgger/swaggerui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@

<script type="text/javascript">
$(function () {
var url = window.location.toString().replace(/\/*#?.*/, '/spec');
var apiPrefix = window.location.pathname.match(/\/([^\/]+)\//)[0];
var url = window.location.toString().replace(/\/*#?.*/, apiPrefix + 'spec');

window.swaggerUi = new SwaggerUi({
url: url,
Expand Down Expand Up @@ -229,4 +230,3 @@ <h1 class="navbar-brand"><a href="http://swagger.io"><span>swagger explorer</spa
</section>
</body>
</html>

0 comments on commit 5d0febc

Please sign in to comment.