Skip to content

Fix header whitelist pattern matching, add x-goog-api-key#2333

Merged
thegrb93 merged 1 commit into
thegrb93:masterfrom
SupplyMan:http-whitelist-fix
May 9, 2026
Merged

Fix header whitelist pattern matching, add x-goog-api-key#2333
thegrb93 merged 1 commit into
thegrb93:masterfrom
SupplyMan:http-whitelist-fix

Conversation

@SupplyMan
Copy link
Copy Markdown
Contributor

Whitelist entries containing hyphens (content-type, x-goog-api-key) failed to match because StringRestrictor.check uses string.match and '-' is a magic Lua pattern character. Wrap entries with string.PatternSafe to escape them.

Also adds x-goog-api-key to the whitelist for Google AI Studio / Gemini API authentication.

Whitelist entries containing hyphens (content-type, x-goog-api-key)
failed to match because StringRestrictor.check uses string.match
and '-' is a magic Lua pattern character. Wrap entries with
string.PatternSafe to escape them.

Also adds x-goog-api-key to the whitelist for Google AI Studio /
Gemini API authentication.
@Cheatoid
Copy link
Copy Markdown
Contributor

Cheatoid commented May 9, 2026

Yes, also add x-api-key.

@thegrb93 thegrb93 merged commit 671ab9e into thegrb93:master May 9, 2026
1 check passed
@SupplyMan SupplyMan deleted the http-whitelist-fix branch May 9, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants