mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
web: only redirect to beta if env.BETA_BASE_URL is present
This commit is contained in:
@@ -34,7 +34,7 @@ export const onRequest: PagesFunction<Env> = async ({ request, env, next }) => {
|
||||
try {
|
||||
const url = new URL(request.url);
|
||||
const response = await (async () => {
|
||||
if (isBeta(request.headers.get("Cookie") || "")) {
|
||||
if (isBeta(request.headers.get("Cookie") || "") && env.BETA_BASE_URL) {
|
||||
const betaUrl = new URL(env.BETA_BASE_URL);
|
||||
betaUrl.pathname = url.pathname;
|
||||
betaUrl.search = url.search;
|
||||
|
||||
Reference in New Issue
Block a user