[GH-ISSUE #728] A few questions about deploying #464

Closed
opened 2026-02-25 20:35:49 +03:00 by kerem · 2 comments
Owner

Originally created by @JaneJeon on GitHub (Apr 19, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/728

First off, I just deployed it and it was easy as cake. Thanks! I do have some questions (that could hopefully be used to improve the documentation):

  1. What does the WHOOGLE_CONFIG_URL actually do? Why would Whoogle need to know about where the site is hosted?
  2. I'm surprised that WHOOGLE_CONFIG_GET_ONLY is even a thing - what searches are even done as a non-GET?
  3. I'm still not sure what WHOOGLE_CONFIG_COUNTRY does; it doesn't seem to filter by country, per se; is it simply changing the google endpoint that whoogle is making requests against?
  4. For WHOOGLE_RESULTS_PER_PAGE, is there a set preset of numbers that are allowed by the underlying google search engine, such as 10/25/50?
  5. For all the WHOOGLE_ALT_*, how do we go about enabling/disabling each of those? For example, if I want to continue to use the youtube.com frontend while using nitter, what would the values of WHOOGLE_ALT_TW and WHOOGLE_ALT_YT look like? What are the available values for these environment variables?
Originally created by @JaneJeon on GitHub (Apr 19, 2022). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/728 First off, I just deployed it and it was easy as cake. Thanks! I do have some questions (that could hopefully be used to improve the documentation): 1. What does the `WHOOGLE_CONFIG_URL` actually do? Why would Whoogle need to know about where the site is hosted? 2. I'm surprised that `WHOOGLE_CONFIG_GET_ONLY` is even a thing - what searches are even done as a non-GET? 3. I'm still not sure what `WHOOGLE_CONFIG_COUNTRY` does; it doesn't seem to _filter_ by country, per se; is it simply changing the google endpoint that whoogle is making requests against? 4. For `WHOOGLE_RESULTS_PER_PAGE`, is there a set preset of numbers that are allowed by the underlying google search engine, such as 10/25/50? 5. For all the `WHOOGLE_ALT_*`, how do we go about enabling/disabling each of those? For example, if I want to continue to use the youtube.com frontend while using nitter, what would the values of `WHOOGLE_ALT_TW` and `WHOOGLE_ALT_YT` look like? What are the available values for these environment variables?
kerem 2026-02-25 20:35:49 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@benbusby commented on GitHub (Apr 20, 2022):

What does the WHOOGLE_CONFIG_URL actually do? Why would Whoogle need to know about where the site is hosted?

WHOOGLE_CONFIG_URL is primarily used to coerce the opensearch template into using the correct URL when hosted behind a reverse proxy like nginx (otherwise the "domain" Flask would use in the template would be "localhost:5000").

I'm surprised that WHOOGLE_CONFIG_GET_ONLY is even a thing - what searches are even done as a non-GET?

There are a couple reasons:

  1. GET requests are required by Chromium based browsers. The opensearch file gets rejected if defined to use with POST requests.
  2. Some users don't like the behavior of POST requests in search. For example, performing a POST request search, clicking a result, and then navigating back to the result page typically causes the browser to prompt the user with a "Resubmit form" alert.

For WHOOGLE_RESULTS_PER_PAGE, is there a set preset of numbers that are allowed by the underlying google search engine, such as 10/25/50?

From a quick check, it looks like the maximum results per page for image results is 20, but regular searches can go quite a bit higher (I just now checked setting it to 100, which worked fine).

For all the WHOOGLE_ALT_*, how do we go about enabling/disabling each of those? For example, if I want to continue to use the youtube.com frontend while using nitter, what would the values of WHOOGLE_ALT_TW and WHOOGLE_ALT_YT look like? What are the available values for these environment variables?

You would enable alts by setting WHOOGLE_CONFIG_ALTS=1 and then for any service that you don't want included, you would set that alt to a blank value (i.e. WHOOGLE_ALT_YT=""). Typically the values that you set for these environment variables should map 1:1 with the counterpart they're replacing, which is the domain without a defined scheme (i.e. WHOOGLE_ALT_TW replaces "twitter.com" with whatever value is defined for that value, or farside.link/nitter if unspecified and alts are enabled).


Hope that all makes sense. Let me know if you want me to clarify/elaborate on anything!

<!-- gh-comment-id:1104481823 --> @benbusby commented on GitHub (Apr 20, 2022): > What does the WHOOGLE_CONFIG_URL actually do? Why would Whoogle need to know about where the site is hosted? `WHOOGLE_CONFIG_URL` is primarily used to coerce the opensearch template into using the correct URL when hosted behind a reverse proxy like nginx (otherwise the "domain" Flask would use in the template would be "localhost:5000"). > I'm surprised that WHOOGLE_CONFIG_GET_ONLY is even a thing - what searches are even done as a non-GET? There are a couple reasons: 1. GET requests are required by Chromium based browsers. The opensearch file gets rejected if defined to use with POST requests. 2. Some users don't like the behavior of POST requests in search. For example, performing a POST request search, clicking a result, and then navigating back to the result page typically causes the browser to prompt the user with a "Resubmit form" alert. > For WHOOGLE_RESULTS_PER_PAGE, is there a set preset of numbers that are allowed by the underlying google search engine, such as 10/25/50? From a quick check, it looks like the maximum results per page for image results is 20, but regular searches can go quite a bit higher (I just now checked setting it to 100, which worked fine). > For all the WHOOGLE_ALT_*, how do we go about enabling/disabling each of those? For example, if I want to continue to use the youtube.com frontend while using nitter, what would the values of WHOOGLE_ALT_TW and WHOOGLE_ALT_YT look like? What are the available values for these environment variables? You would enable alts by setting `WHOOGLE_CONFIG_ALTS=1` and then for any service that you don't want included, you would set that alt to a blank value (i.e. `WHOOGLE_ALT_YT="").` Typically the values that you set for these environment variables should map 1:1 with the counterpart they're replacing, which is the domain without a defined scheme (i.e. `WHOOGLE_ALT_TW` replaces "twitter.com" with whatever value is defined for that value, or `farside.link/nitter` if unspecified and alts are enabled). ___ Hope that all makes sense. Let me know if you want me to clarify/elaborate on anything!
Author
Owner

@JaneJeon commented on GitHub (Apr 20, 2022):

WHOOGLE_CONFIG_URL is primarily used to coerce the opensearch template into using the correct URL when hosted behind a reverse proxy like nginx (otherwise the "domain" Flask would use in the template would be "localhost:5000").

So why does Flask even need to coerce the search result using the correct URL?

And as for the POST stuff, I was asking what searches are even being done that requires POST, because I thought it was all supposed to be a GET request; the presence of the “force searches to be done in GET” means there are searches being done in POST, no? So I’m wondering what those are, because I’ve literally never heard of anyone doing searches with a POST

And thanks for the alts instruction

<!-- gh-comment-id:1104486348 --> @JaneJeon commented on GitHub (Apr 20, 2022): > WHOOGLE_CONFIG_URL is primarily used to coerce the opensearch template into using the correct URL when hosted behind a reverse proxy like nginx (otherwise the "domain" Flask would use in the template would be "localhost:5000"). So why does Flask even need to coerce the search result using the correct URL? And as for the POST stuff, I was asking what searches are even being done that requires POST, because I thought it was _all_ supposed to be a GET request; the presence of the “force searches to be done in GET” means there are searches being done in POST, no? So I’m wondering what those are, because I’ve literally never heard of anyone doing searches with a POST And thanks for the alts instruction
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#464
No description provided.