File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
packages/brick-container/serve Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -116,19 +116,16 @@ export default function getProxy(env, getRawIndexHtml) {
116116 req . path === "/next/api/auth/login/v2" &&
117117 Array . isArray ( setCookies )
118118 ) {
119- // - If the server is https, but the local is http, clear the secure cookie flags;
120- // - Otherwise, if the local is localhost and cookieSameSiteNone is enabled (default),
119+ // - If the local is localhost and cookieSameSiteNone is enabled (default),
121120 // add the secure cookie flags;
122121 // - Otherwise, if the local is https, do nothing;
123122 // - Otherwise, clear the secure cookie flags;
124123 const strategy =
125- env . server . startsWith ( "https:" ) && ! env . https
126- ? "clear"
127- : env . cookieSameSiteNone && env . host === "localhost"
128- ? "add"
129- : env . https
130- ? null
131- : "clear" ;
124+ env . cookieSameSiteNone && env . host === "localhost"
125+ ? "add"
126+ : env . https
127+ ? null
128+ : "clear" ;
132129 if ( strategy ) {
133130 // Note: it seems that now Chrome (v107) requires `SameSite=None` even for localhost.
134131 // However, `Secure` can use used with non-http for localhost.
You can’t perform that action at this time.
0 commit comments