feat: Support running webapp and embed-core playground on HTTPS. It allows to test SameSite cookie attribute easily in embed (#15272)
* feat: Support running webapp and embed-core playground on HTTPS. It allows to test SameSite attribute easily in embed * Update yarn.lock * feat: Support running webapp and embed-core playground on HTTPS. It allows to test SameSite attribute easily in embed * Update yarn.lock * Fix git-setup.sh * Fix yarn.lock
This commit is contained in:
1 parent
50338dcd61
commit
ececef96e5
8 files changed
+254
-51
No files matched your search
@@ -68,3 +68,5 @@ public/embed
|
||||
|
||||
# Copied app-store images
|
||||
public/app-store
|
||||
|
||||
certificates
|
||||
@@ -54,6 +54,20 @@ if (!process.env.NEXT_PUBLIC_API_V2_URL) {
|
||||
console.error("Please set NEXT_PUBLIC_API_V2_URL");
|
||||
}
|
||||
|
||||
const getHttpsUrl = (url) => {
|
||||
if (!url) return url;
|
||||
if (url.startsWith("http://")) {
|
||||
return url.replace("http://", "https://");
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
if (process.argv.includes("--experimental-https")) {
|
||||
process.env.NEXT_PUBLIC_WEBAPP_URL = getHttpsUrl(process.env.NEXT_PUBLIC_WEBAPP_URL);
|
||||
process.env.NEXTAUTH_URL = getHttpsUrl(process.env.NEXTAUTH_URL);
|
||||
process.env.NEXT_PUBLIC_EMBED_LIB_URL = getHttpsUrl(process.env.NEXT_PUBLIC_EMBED_LIB_URL);
|
||||
}
|
||||
|
||||
const validJson = (jsonString) => {
|
||||
try {
|
||||
const o = JSON.parse(jsonString);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"analyze:browser": "BUNDLE_ANALYZE=browser next build",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next",
|
||||
"dev": "next dev",
|
||||
"dev-https": "NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --experimental-https",
|
||||
"dx": "yarn dev",
|
||||
"test-codegen": "yarn playwright codegen http://localhost:3000",
|
||||
"type-check": "tsc --pretty --noEmit",
|
||||
|
||||
Reference in new issue
Block a user