-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Add support for POST requests on searches for privacy #5551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
9c19a18 to
68c4de1
Compare
|
Sounds like a neat feature. I know searx(ng) have that feature too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a privacy-focused search feature that allows users to submit search queries via POST requests instead of GET requests, preventing search terms from being saved in browser history. Users can enable this feature through a new "Search privacy" preference in their settings.
Key Changes:
- Added a new
search_privacyboolean preference to user and config preferences - Modified the search form to use POST method when search privacy is enabled
- Updated the search page title to display "Search" instead of the query text when privacy mode is active
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/invidious/routing.cr | Added POST route handler for /search endpoint |
| src/invidious/routes/search.cr | Updated search handler to accept both GET and POST requests by checking request method |
| src/invidious/views/components/search_box.ecr | Conditionally sets form method to POST or GET based on search_privacy preference |
| src/invidious/views/search.ecr | Modified page title to hide search query when search_privacy is enabled |
| src/invidious/user/preferences.cr | Added search_privacy property to Preferences struct |
| src/invidious/routes/preferences.cr | Added handling for search_privacy form parameter |
| src/invidious/config.cr | Added search_privacy default configuration option |
| locales/en-US.json | Added localization strings for the search privacy preference UI |
| src/invidious/views/user/preferences.ecr | Added checkbox UI for enabling/disabling search privacy feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add support for POST requests on the search field for people that do not want their search history saved in their browser history.