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:
2026-06-15 18:29:54 +02:00
parent 5d7ef5fa3b
commit e5acf75cac
+2 -3
View File
@@ -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",