File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/open-next/src/overrides/converters Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ const converter: Converter<InternalEvent, InternalResult | MiddlewareResult> = {
3535 ) ,
3636 ) ;
3737
38- // This is to make libraries (i.e next-auth) that rely on this header to work out of the box in `opennextjs-cloudflare preview`.
39- if ( url . protocol . slice ( 0 , - 1 ) === "http" && url . hostname === "localhost" ) {
38+ // This is to make libraries (e.g. next-auth) that rely on this header to work out of the box in `opennextjs-cloudflare preview`.
39+ // See https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/lib/utils/env.ts#L95-L96
40+ if ( url . protocol . startsWith ( "http" ) && url . hostname === "localhost" ) {
4041 headers [ "x-forwarded-proto" ] = "http" ;
4142 }
4243
You can’t perform that action at this time.
0 commit comments