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:
Hariom Balhara authored and GitHub committed 2024-06-28 13:06:59 +01:00
1 parent 50338dcd61
commit ececef96e5
8 files changed
+254 -51

No files matched your search

+2
View File
@@ -68,3 +68,5 @@ public/embed
# Copied app-store images
public/app-store
certificates
+14
View File
@@ -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);
+1
View File
@@ -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",