diff --git a/.browserslistrc b/.browserslistrc index a108c59..d8dab11 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index 3da6839..a7b51ce 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Locals diff --git a/.env.vault b/.env.vault index 828ced0..fc65b09 100644 --- a/.env.vault +++ b/.env.vault @@ -8,12 +8,12 @@ DOTENV_VAULT_MAIN="3rfi+ClkONvfHPiU9FTBcC1+Um/L8QeM9dRw1jFzEqzZXw==" DOTENV_VAULT_MAIN_VERSION=1 # dev -DOTENV_VAULT_DEV="t8eoerWaqii8UEh0wVnfjZaHTBO/ErR4zcWpmCrOQpctAbWopWsu0w1vPKX63PHsVFr9ozJ/Jn84/TZo83AslLTErdeEm59C8ONiXfQn83VA6waZ3rNWd8SwMptTbiprJszpB2aDWcirakZOvVuZApJYq1Zp21x699aV5d6HpQxeZwD+6TV3dBCkTQI7vffhjsz95vnMk8ZNzM/knPWO2EvUk0OqjJSx2Dv8xGQ5UA3qpaUTFpNB2fj8eA2op4lcFasIgU443B1iBD1FQtmgFxynt1wuxTA+8wXIpootzye16jK8wJhQaQ7NgR1nfPFHGR2GmxMjc8gMzFiHwdySqgvMyBL1d+51Vig8vq156r8yRcsW/Xd8YSJwfEctDFBQWLc3FOl+R79PJDkRswSvuinJdho1jf/KhUyI6NbjE8nNA8Gm0H27BjRgjQXBk4gf/cohNyJ/mvgAx3NbfPxLQ9D3LmYcAI/2jilqJMxLtNmEI0uz3cVDGFk/TX9xOkiHlYB2QJoGTCDiaVNyERAgPhRLnKdoaLzOnZCxptakmGPyd3vdJkYe7GGesQV2dYugNwHJzUCJiEpuIaAT6PpR/D/Cg08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khwxdZ9" -DOTENV_VAULT_CI_VERSION=265 +DOTENV_VAULT_CI="0uQikT8JMsWdK/qc+iU1/dTy+rNVY3g/zJamJsZWWEHVMwgW1qfnyDKEDWAhORpXbTQE66iC9CGam2+tP3pqkI5eGIjtAbDkSgbo9ufFn8knlXA5/fSd/iMctZWE3JMcU4269YbpjKBnqzTZtwhvBpDMk2ko2RHB/FduDD4BgYbOcFjq8I1cjoTGYxD0gUjzWZGCGb++F2/EI0ih9uaeE9O8KTvMBAT2vMIWm9jGjVRbUgdPdaYR6VFUHwywE88juTsgBndVmhweCzz6qBNJ7l5uUjFuLo1wxTWfFwyYZzvNwU1c5G30Ond1ThXyi65A9i+ARgqDNu/ne85CeZ+6ykC15fhgshE5XeC6xBpVadyTM0+0LjtZpseFtmkqmxkDWn8tXjxB3f664solZBN9GwxVz4JitSF/x1++qAo79jgiAWPHTPzXhlG3bsPnUnprauT3FiAJiklMcsFaZiJIR4hkeSgxRiXdEyh3guweRxFRAQoudh9xeAOHlmOG+cu+tsNIB0yZ4X+lifzkoe417Do74+VDLAaPJVX9VqkJbc2UbmU/hAtlbf7Zdo0DtHHhk6QTb33PL9QGfExLxUnJrobBkqOfTAf+hBARMTlcYKZ6ygqpZSzTcSHG5CTqjTPMSlAlBP94VEnNKhjIwf15NQSzm4g6H7KY1ywA0L0q791qKlDqE4tFlNQ/m/rONhMT78DbQPZpToIJDBmssWtNCALLfYUFDupk6HuRzLe9xgClBQBVwDop8gzcc068cLUBU7unP2Wf1dSOtCNzlWCmqFm7M66zxQRXO5TVIKjPwMuJQ0Jh+NL8DTnM1q/AWovp7DzxP82rNQVy+UuxtNk7+tvPhf0YQexQFzvMHIqI9w3Gky6mIgRh36npv/r7" +DOTENV_VAULT_CI_VERSION=267 # stage DOTENV_VAULT_STAGE="bfqZYD8oVLWMZ0JR5LICV+sB/btaXavszxZLxTfwSH8U5fg=" diff --git a/.gitattributes b/.gitattributes index 20c7176..ab1b9e6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Default diff --git a/.gitignore b/.gitignore index 838b4db..5dcb33d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Locals diff --git a/.npmignore b/.npmignore index 3c4619e..d19336d 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index 7cc058f..24d20e8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index aff3c8e..0892aec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./settings.mjs`. * - * Last generated using `./settings.mjs` Mar 8, 2024 10:56 PM UTC. + * Last generated using `./settings.mjs` Mar 8, 2024 11:07 PM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index 16f6232..95893ce 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Mar 8, 2024 10:56 PM UTC. +# Last generated Mar 8, 2024 11:07 PM UTC. # Locals diff --git a/package-lock.json b/package-lock.json index 22eb00b..cf5ef75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.285", + "version": "1.0.286", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities.cfw", - "version": "1.0.285", + "version": "1.0.286", "cpu": [ "x64", "arm64" @@ -27,7 +27,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.891", + "@clevercanyon/utilities": "^1.0.892", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" @@ -1017,9 +1017,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.891", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.891.tgz", - "integrity": "sha512-Ge1X63WiH8tHDov10o1RHJgdPErbmTridrgJvYsiinIbgA3y+PIhT+bCED1Ph/FtQPxyJzQ6zRbQmy3jh1LQFQ==", + "version": "1.0.892", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.892.tgz", + "integrity": "sha512-CqmZDoEjUD0Kzyv19as5lAN3ABZNXqVhxjyg/UZs6hKBrocJC2Mt2p9T3UhGOJh2qBMKLTz5Mxrqo56Q8zI8eg==", "cpu": [ "x64", "arm64" @@ -1077,9 +1077,9 @@ } }, "node_modules/@clevercanyon/utilities.cfp": { - "version": "1.0.233", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.233.tgz", - "integrity": "sha512-UUSx+GR0QyeKn8ulF5ULTR0Hl6j51C8t1pMS0d+VR4J00B9OuzVYjNgc/9gezJDBMCKAFnW6eEPzWbyH/SqStA==", + "version": "1.0.234", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.234.tgz", + "integrity": "sha512-k+xsloKiqf4Pr+EgTmmqeDKVBG4H0qRYxq4Gaf/JZJgZjUfh6m57wWyQ8iByTDncAhyLHGvzV3JZu+tyPh+OLw==", "cpu": [ "x64", "arm64" @@ -1098,14 +1098,14 @@ }, "peerDependencies": { "@clevercanyon/utilities": "^1.0.891", - "@clevercanyon/utilities.cfw": "^1.0.285", + "@clevercanyon/utilities.cfw": "^1.0.286", "@clevercanyon/utilities.web": "^1.0.152" } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.285", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.285.tgz", - "integrity": "sha512-jJ469H8RDYs03gS1FZnOnGBOPP5XXVI0G6H7na/ErInUvKlney0ThAYpf5Q5z5e+C2dJHSe3LhimL0/0zS8W/w==", + "version": "1.0.286", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.286.tgz", + "integrity": "sha512-k5sehN2nAHFkc1k6q5aHKeBJZ4ASaELvvsaiD4xaZqbDM9sYcTd4mY/XOKheubHicFhD1yOAa04UQ0lLUxHp2A==", "cpu": [ "x64", "arm64" @@ -31375,15 +31375,18 @@ } }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" diff --git a/package.json b/package.json index 9156164..3243e13 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.286", + "version": "1.0.287", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities.cfw", "description": "Utilities for JavaScript apps running in a Cloudflare Worker environment.", @@ -64,7 +64,7 @@ }, "dependencies": {}, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.891", + "@clevercanyon/utilities": "^1.0.892", "@cloudflare/ai": "1.0.53", "@upstash/ratelimit": "1.0.0", "@upstash/redis": "1.28.0" diff --git a/src/cfw.ts b/src/cfw.ts index 7e7dba7..5f54a0c 100644 --- a/src/cfw.ts +++ b/src/cfw.ts @@ -131,6 +131,7 @@ export const handleFetchEvent = async (ircData: InitialRequestContextData): Prom auditLogger = baseAuditLogger.withContext({}, { request }); } const url = $url.parse(request.url) as $type.cfw.URL, + originalURL = $url.parse(originalRequest.url) as $type.cfw.URL, consentLogger = baseConsentLogger.withContext({}, { request }), rcData = $obj.freeze({ scheduledEvent, @@ -155,8 +156,8 @@ export const handleFetchEvent = async (ircData: InitialRequestContextData): Prom } response ??= $http.prepareResponse(request, { status: 404 }) as Promise<$type.cfw.Response>; - if (url.searchParams.has('utx_audit_log')) { - const token = url.searchParams.get('utx_audit_log') || '', + if (originalURL.searchParams.has('utx_audit_log')) { + const token = originalURL.searchParams.get('utx_audit_log') || '', validToken = auditLoggerBearerToken.split(' ', 2)[1] || ''; if (token && validToken && $crypto.safeEqual(token, validToken)) { diff --git a/tsconfig.json b/tsconfig.json index c9eccf9..d612227 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./tsconfig.mjs`. * - * Last generated using `./tsconfig.mjs` Mar 8, 2024 10:56 PM UTC. + * Last generated using `./tsconfig.mjs` Mar 8, 2024 11:07 PM UTC. */ { "include": ["./src/**/*", "./dev-types.d.ts"], diff --git a/wrangler.toml b/wrangler.toml index e5bb3aa..1b74949 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -7,7 +7,7 @@ # @note This entire file will be updated automatically. # @note Instead of editing here, please review `./wrangler.mjs`. # -# Last generated using `./wrangler.mjs` Mar 8, 2024 10:56 PM UTC. +# Last generated using `./wrangler.mjs` Mar 8, 2024 11:07 PM UTC. ## send_metrics = false