Skip to content

Prevent expensive query.json queries#12466

Merged
mekarpeles merged 1 commit intointernetarchive:masterfrom
cdrini:perf/query-json-likes
Apr 28, 2026
Merged

Prevent expensive query.json queries#12466
mekarpeles merged 1 commit intointernetarchive:masterfrom
cdrini:perf/query-json-likes

Conversation

@cdrini
Copy link
Copy Markdown
Collaborator

@cdrini cdrini commented Apr 28, 2026

We've been seeing some LIKE query traffic to our /query.json endpoints, and these fields aren't meant to support that, so block it off.

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings April 28, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Blocks expensive /query.json requests which use LIKE-style matching on title/subtitle at the nginx layer to reduce costly traffic hitting the app/DB.

Changes:

  • Add nginx request filtering rules intended to return 422 for /query.json requests containing title~ / subtitle~ patterns (including URL-encoded JSON forms).

Comment thread docker/web_nginx.conf Outdated
@cdrini cdrini force-pushed the perf/query-json-likes branch from 24cf994 to e18ba8e Compare April 28, 2026 22:58
@cdrini cdrini added the Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. label Apr 28, 2026
@mekarpeles mekarpeles merged commit e67b544 into internetarchive:master Apr 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants