Ensure beforeFiles rewrites come after redirects when continuing (#6289)

This commit is contained in:
JJ Kasper
2021-05-26 12:50:51 -05:00
committed by GitHub
parent 01f53f36fc
commit e516c1f49f
4 changed files with 52 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ function getCheckAndContinue(
);
} else if (route.check) {
checks.push(route);
} else if (route.continue) {
} else if (route.continue && !route.override) {
continues.push(route);
} else {
others.push(route);

View File

@@ -104,6 +104,9 @@ export const routesSchema = {
continue: {
type: 'boolean',
},
override: {
type: 'boolean',
},
check: {
type: 'boolean',
},

View File

@@ -27,6 +27,7 @@ export type Source = {
headers?: { [name: string]: string };
methods?: string[];
continue?: boolean;
override?: boolean;
check?: boolean;
important?: boolean;
status?: number;