Skip to content

Commit 1183796

Browse files
committed
Fix protocol in url
1 parent 6b94c88 commit 1183796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/getDynamicTemplates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const getServerlessTs = ({ projectName, siteRoot }) => javascript`
8989
if (!!query) {
9090
query = '?' + query;
9191
}
92-
return "https://" + event.headers.host + event.path + query;
92+
return (event.headers['x-forwarded-proto'] || 'http') + "://" + event.headers.host + event.path + query;
9393
}
9494
9595
export async function render(event, context): Promise<RenderResponse> {

0 commit comments

Comments
 (0)