[GH-ISSUE #201] [BUG] Adding as search engine in Firefox ignores root URL #139

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

Originally created by @sethforprivacy on GitHub (Feb 13, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/201

Describe the bug
When deploying via Docker and using an NGINX reverse proxy, Whoogle works properly when navigating to full URL, but does not work when added as a search engine to Firefox.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy via Docker: docker run --restart unless-stopped --publish 5000:5000 --detach --name whoogle-search -e "HTTPS_ONLY=1" benbusby/whoogle-search:latest
  2. Deploy NGINX reverse proxy (full config at bottom)
  3. Navigate to site
  4. Set root URL to proper HTTPS URL
  5. Click three-button menu>Add Search Engine
  6. Search using address bar
  7. Firefox navigates to non-HTTPS URL and fails

Deployment Method

  • Heroku (one-click deploy)
  • Docker
  • run executable
  • pip/pipx
  • Other: [describe setup]

Version of Whoogle Search

  • Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)
  • Version [version number]
  • Not sure

Desktop (please complete the following information):

  • OS: Ubuntu 20.10
  • Browser: Firefox
  • Version: 85.0.1

Additional context

server {
    server_name search.domain.name;

    location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $host;

      proxy_pass http://127.0.0.1:5000;

    }


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/search.domain.name/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/search.domain.name/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
Originally created by @sethforprivacy on GitHub (Feb 13, 2021). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/201 **Describe the bug** When deploying via Docker and using an NGINX reverse proxy, Whoogle works properly when navigating to full URL, but does not work when added as a search engine to Firefox. **To Reproduce** Steps to reproduce the behavior: 1. Deploy via Docker: `docker run --restart unless-stopped --publish 5000:5000 --detach --name whoogle-search -e "HTTPS_ONLY=1" benbusby/whoogle-search:latest` 2. Deploy NGINX reverse proxy (full config at bottom) 3. Navigate to site 4. Set root URL to proper HTTPS URL 5. Click three-button menu>Add Search Engine 6. Search using address bar 7. Firefox navigates to non-HTTPS URL and fails **Deployment Method** - [ ] Heroku (one-click deploy) - [x] Docker - [ ] `run` executable - [ ] pip/pipx - [ ] Other: [describe setup] **Version of Whoogle Search** - [x] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc) - [ ] Version [version number] - [ ] Not sure **Desktop (please complete the following information):** - OS: Ubuntu 20.10 - Browser: Firefox - Version: 85.0.1 **Additional context** ``` server { server_name search.domain.name; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_pass http://127.0.0.1:5000; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/search.domain.name/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/search.domain.name/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } ```
kerem 2026-02-25 20:35:00 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maxlinux2000 commented on GitHub (Mar 5, 2021):

I can confirm the bug. The same happens with apache proxy in a raspberryPi4 outside my home network (another fiber conection of my office)

to reproduce deply a whoogle with default options, then create a website with apache, load the following modules

a2enmod proxy_http proxy proxy_balancer proxy_http proxy_fcgi proxy_ajp
systemctl restart apache2
 

Add apache Directives to the site

ProxyPass /  http://192.168.0.100:5000/
ProxyPassReverse  /  http://192.168.0.100:5000/

where the 192.168.0.100 is the fixed IP of the raspberrypi but this is not the public IP.
It works fine if deploy in a VPS (digitalocean for example) and the IP of eth0 is public.

the bug comes from the fact that adding the search engine to firefox uses the IP that Docker tells it instead of what we put in the Root URL

<!-- gh-comment-id:791597573 --> @maxlinux2000 commented on GitHub (Mar 5, 2021): I can confirm the bug. The same happens with apache proxy in a raspberryPi4 outside my home network (another fiber conection of my office) to reproduce deply a whoogle with default options, then create a website with apache, load the following modules ``` a2enmod proxy_http proxy proxy_balancer proxy_http proxy_fcgi proxy_ajp systemctl restart apache2 ``` Add apache Directives to the site ``` ProxyPass / http://192.168.0.100:5000/ ProxyPassReverse / http://192.168.0.100:5000/ ``` where the 192.168.0.100 is the fixed IP of the raspberrypi but this is not the public IP. It works fine if deploy in a VPS (digitalocean for example) and the IP of eth0 is public. the bug comes from the fact that adding the search engine to firefox uses the IP that Docker tells it instead of what we put in the Root URL
Author
Owner

@maxlinux2000 commented on GitHub (Mar 5, 2021):

here a workaround to make the searches work, from the url bar.
It is in Spanish, but there are many automatic translators on the internet
This workaround will help you, while the programmer solves the bug.

https://isla1.tormentasolar.win/whoogle-y-google/

<!-- gh-comment-id:791677598 --> @maxlinux2000 commented on GitHub (Mar 5, 2021): here a workaround to make the searches work, from the url bar. It is in Spanish, but there are many automatic translators on the internet This workaround will help you, while the programmer solves the bug. https://isla1.tormentasolar.win/whoogle-y-google/
Author
Owner

@benbusby commented on GitHub (Mar 7, 2021):

I've been trying to reproduce this for a while, with no luck. Can one of you validate that the values in <your whoogle url>/opensearch.xml do not match what you have in the root URL field of the config? The template process to generate the opensearch xml is fairly straightforward, so I'm a bit confused why it isn't working for you both. For example, if I change any of my instance root URLs to "example" and then load the opensearch.xml file, it's updated to use "example" as the main search URL field.

My inclination is that Firefox may be caching an old version of the opensearch file from before the root URL is updated, but I'd like to double check.

<!-- gh-comment-id:792311247 --> @benbusby commented on GitHub (Mar 7, 2021): I've been trying to reproduce this for a while, with no luck. Can one of you validate that the values in `<your whoogle url>/opensearch.xml` do not match what you have in the root URL field of the config? The template process to generate the opensearch xml is fairly straightforward, so I'm a bit confused why it isn't working for you both. For example, if I change any of my instance root URLs to "example" and then load the opensearch.xml file, it's updated to use "example" as the main search URL field. My inclination is that Firefox may be caching an old version of the opensearch file from before the root URL is updated, but I'd like to double check.
Author
Owner

@benbusby commented on GitHub (Mar 28, 2021):

With the recent changes to setting the root URL as an environment variable (available on the beta Docker image), I'm going to assume this is fixed. Please see the updated documentation for more info.

<!-- gh-comment-id:808940266 --> @benbusby commented on GitHub (Mar 28, 2021): With the recent changes to setting the root URL as an environment variable (available on the `beta` Docker image), I'm going to assume this is fixed. Please [see the updated documentation](https://github.com/benbusby/whoogle-search#config-environment-variables) for more info.
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#139
No description provided.