Skip to content

Commit 9381c59

Browse files
committed
fix: use global prefix
1 parent 47a5b26 commit 9381c59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export const swagger =
3737
...documentation.info
3838
}
3939

40+
const pathWithPrefix = `${app.config.prefix}${path}`;
41+
4042
app.get(path, () => {
4143
return new Response(
4244
`<!DOCTYPE html>
@@ -61,7 +63,7 @@ export const swagger =
6163
<script>
6264
window.onload = () => {
6365
window.ui = SwaggerUIBundle({
64-
url: '${path}/json',
66+
url: '${pathWithPrefix}/json',
6567
dom_id: '#swagger-ui',
6668
});
6769
};

0 commit comments

Comments
 (0)