fix(api-docs): use relative spec URL — req.url returns internal Docker address
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
export async function GET(req: Request) {
|
||||
const base = new URL(req.url).origin;
|
||||
export async function GET() {
|
||||
const html = `<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
@@ -21,7 +20,7 @@ export async function GET(req: Request) {
|
||||
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-standalone-preset.js"></script>
|
||||
<script>
|
||||
SwaggerUIBundle({
|
||||
url: "${base}/api/v1/spec",
|
||||
url: "/api/v1/spec",
|
||||
dom_id: "#swagger-ui",
|
||||
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
|
||||
layout: "StandaloneLayout",
|
||||
|
||||
Reference in New Issue
Block a user