| 1 | // Alchemy modifications are licensed under Apache-2.0. |
| 2 | // This file includes third-party code; see /THIRD_PARTY_LICENSES.md. |
| 3 | export const REDIRECTS_VERSION = 1; |
| 4 | export const HEADERS_VERSION = 2; |
| 5 | |
| 6 | export const PERMITTED_STATUS_CODES = new Set([200, 301, 302, 303, 307, 308]); |
| 7 | export const HEADER_SEPARATOR = ":"; |
| 8 | export const MAX_LINE_LENGTH = 2000; |
| 9 | export const MAX_HEADER_RULES = 100; |
| 10 | export const MAX_DYNAMIC_REDIRECT_RULES = 100; |
| 11 | export const MAX_STATIC_REDIRECT_RULES = 2000; |
| 12 | export const UNSET_OPERATOR = "! "; |
| 13 | |
| 14 | export const SPLAT_REGEX = /\*/g; |
| 15 | export const PLACEHOLDER_REGEX = /:[A-Za-z]\w*/g; |
| 16 | |
| 17 | /** Max number of rules in `run_worker_first` */ |
| 18 | export const MAX_ROUTES_RULES = 100; |
| 19 | /** Max char length of each rule in `run_worker_first` */ |
| 20 | export const MAX_ROUTES_RULE_LENGTH = 100; |