mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Fix the /api page error when using base URL
This commit is contained in:
@@ -154,6 +154,7 @@ struct MainRouter
|
|||||||
end
|
end
|
||||||
|
|
||||||
get "/api" do |env|
|
get "/api" do |env|
|
||||||
|
base_url = Config.current.base_url
|
||||||
render "src/views/api.html.ecr"
|
render "src/views/api.html.ecr"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<redoc spec-url="/openapi.json"></redoc>
|
<redoc spec-url="<%= base_url %>openapi.json"></redoc>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user