Skip to content

Commit 24b62b7

Browse files
committed
Fix error where protocol resolves to http during development
1 parent e2dc322 commit 24b62b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/common.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function setRelativeServerLocation(location: string): ExegesisPlugin {
197197
return {
198198
//preRouting:(ctx)=>{}
199199
postRouting: (ctx: ExegesisPluginContext) => {
200-
let url = `${ctx.req.protocol || "https"}://${ctx.req.headers.host}/${location}`
200+
let url = `${process.env.NODE_ENV === "production" ? "https" : (ctx.req.protocol || "https")}://${ctx.req.headers.host}/${location}`
201201
ctx.api.serverObject = {
202202
url,
203203
description: `Auto-generated server root`

0 commit comments

Comments
 (0)