diff --git a/packages/daf-express/src/api-schema-router.ts b/packages/daf-express/src/api-schema-router.ts index 57a5ab172..48dc1d402 100644 --- a/packages/daf-express/src/api-schema-router.ts +++ b/packages/daf-express/src/api-schema-router.ts @@ -51,7 +51,7 @@ export const ApiSchemaRouter = (options: ApiSchemaRouterOptions): Router => { router.get('/', (req: RequestWithAgent, res) => { if (req.agent) { const openApiSchema = getOpenApiSchema(req.agent, '', options.exposedMethods) - const url = req.protocol + '://' + req.hostname + options.basePath + const url = (req.headers['x-forwarded-proto'] || req.protocol) + '://' + req.hostname + options.basePath openApiSchema.servers = [{ url }] if (options.securityScheme && openApiSchema.components) {