mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-17 08:00:02 -04:00
site specific flags
This commit is contained in:
parent
0906dd78a9
commit
920bbd8d69
8 changed files with 34 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
|||
import { flagEnabled } from "../../../scramjet";
|
||||
import { config, unrewriteUrl, rewriteUrl } from "../../../shared";
|
||||
import { ScramjetClient } from "../../client";
|
||||
let nativeworker;
|
||||
|
@ -35,8 +36,8 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
const args = ctx.this[ARGS];
|
||||
if (!args || args[2]) return;
|
||||
|
||||
if (!self.$scramjet.config.flags.syncxhr) {
|
||||
console.warn("sync xhr disabled in flags");
|
||||
if (!flagEnabled("syncxhr", client.url)) {
|
||||
console.warn("ignoring request - sync xhr disabled in flags");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue