mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 14:56:38 +08:00
fix(frontend): keep browser API on same-origin rewrites in dev
Document that NEXT_PUBLIC_WAVELET_BACKEND_URL must stay unset for local next dev so axios hits /api/* and Next rewrites proxy to the backend.
This commit is contained in:
@@ -17,12 +17,13 @@ function flatten(obj, prefix = '') {
|
||||
return keys;
|
||||
}
|
||||
|
||||
const zh = JSON.parse(readFileSync(resolve(root, 'messages/zh-CN.json'), 'utf8'));
|
||||
const zh = JSON.parse(
|
||||
readFileSync(resolve(root, 'messages/zh-CN.json'), 'utf8'),
|
||||
);
|
||||
const en = JSON.parse(readFileSync(resolve(root, 'messages/en.json'), 'utf8'));
|
||||
const zhKeys = flatten(zh);
|
||||
const enKeys = flatten(en);
|
||||
const onlyZh = [...zhKeys].filter((k) => !enKeys.has(k)).sort();
|
||||
const onlyEn = [...enKeys].filter((k) => !enKeys.has(k) === false && !zhKeys.has(k)).sort();
|
||||
const onlyEnFixed = [...enKeys].filter((k) => !zhKeys.has(k)).sort();
|
||||
|
||||
if (onlyZh.length || onlyEnFixed.length) {
|
||||
|
||||
Reference in New Issue
Block a user