diff --git a/src/routes/swagger.ts b/src/routes/swagger.ts index ec00940..ec9da9e 100644 --- a/src/routes/swagger.ts +++ b/src/routes/swagger.ts @@ -1,3 +1,5 @@ +import { config } from '../env'; + const errorSchema = (example: string) => ({ type: 'object', properties: { @@ -117,7 +119,7 @@ export const handleSwaggerJson = async (): Promise => { }, download_url: { type: 'string', - example: 'https://tele.asepharyana.tech/f/xYz123', + example: `${config.baseUrl}/f/xYz123`, }, }, }), @@ -269,6 +271,8 @@ export const handleSwaggerHtml = async (): Promise => { status: 200, headers: { 'content-type': 'text/html; charset=utf-8', + 'access-control-allow-origin': '*', + 'x-content-type-options': 'nosniff', }, }); };