[GH-ISSUE #8] [BUG] opensearch.xml always using localhost #9

Closed
opened 2026-02-25 20:34:39 +03:00 by kerem · 5 comments
Owner

Originally created by @JohnCMoon on GitHub (May 10, 2020).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/8

Originally assigned to: @benbusby on GitHub.

When using Docker behind an Nginx proxy and ran into an issue where "Adding Search Engine" with Firefox isn't working. The base URL in the opensearch.xml file ends up being "localhost:8888" instead of my host URL.

To Reproduce

  1. In Firefox, navigate to a non-localhost instance of Whoogle
  2. Click on the three dots in the URL -> Add Search Engine
  3. Attempt to search in Firefox with the new Whoogle engine
  4. See "unable to connect to localhost:8888"

Expected behavior
The browser search engine would use the actual URL of the instance (passed with the --host param).

Workaround
I worked around this issue by changing the main_url param in routes.py to use my custom domain:
template = render_template('opensearch.xml', main_url='<MY_URL_HERE>')

Originally created by @JohnCMoon on GitHub (May 10, 2020). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/8 Originally assigned to: @benbusby on GitHub. When using Docker behind an Nginx proxy and ran into an issue where "Adding Search Engine" with Firefox isn't working. The base URL in the opensearch.xml file ends up being "localhost:8888" instead of my host URL. **To Reproduce** 1. In Firefox, navigate to a non-localhost instance of Whoogle 2. Click on the three dots in the URL -> Add Search Engine 3. Attempt to search in Firefox with the new Whoogle engine 4. See "unable to connect to localhost:8888" **Expected behavior** The browser search engine would use the actual URL of the instance (passed with the `--host` param). **Workaround** I worked around this issue by changing the `main_url` param in `routes.py` to use my custom domain: `template = render_template('opensearch.xml', main_url='<MY_URL_HERE>')`
kerem 2026-02-25 20:34:39 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@benbusby commented on GitHub (May 10, 2020):

Hey @JohnCMoon, thanks for bringing this to my attention. I just pushed an update that allows for configuration of a root URL using the config section on the main page of the app. Try setting that to your host URL and let me know if that ends up working for you.

Oh and you'll likely need to remove the existing search config for Whoogle search from your Firefox preferences before trying this again (in case you haven't done that already).

<!-- gh-comment-id:626378338 --> @benbusby commented on GitHub (May 10, 2020): Hey @JohnCMoon, thanks for bringing this to my attention. I just pushed an update that allows for configuration of a root URL using the config section on the main page of the app. Try setting that to your host URL and let me know if that ends up working for you. Oh and you'll likely need to remove the existing search config for Whoogle search from your Firefox preferences before trying this again (in case you haven't done that already).
Author
Owner

@benbusby commented on GitHub (May 15, 2020):

Closing for now, as I believe this is fixed. Feel free to reopen if that isn't the case. Thanks!

<!-- gh-comment-id:629372101 --> @benbusby commented on GitHub (May 15, 2020): Closing for now, as I believe this is fixed. Feel free to reopen if that isn't the case. Thanks!
Author
Owner

@JohnCMoon commented on GitHub (May 17, 2020):

Yep, this is fixed. Thank you!

<!-- gh-comment-id:629844282 --> @JohnCMoon commented on GitHub (May 17, 2020): Yep, this is fixed. Thank you!
Author
Owner

@GyokuroT commented on GitHub (May 20, 2020):

Hey @JohnCMoon, thanks for bringing this to my attention. I just pushed an update that allows for configuration of a root URL using the config section on the main page of the app. Try setting that to your host URL and let me know if that ends up working for you.

Oh and you'll likely need to remove the existing search config for Whoogle search from your Firefox preferences before trying this again (in case you haven't done that already).

I also run Whoogle behind a reverse proxy. Does it have any adverse effects if some random internet user changes the root URL?

<!-- gh-comment-id:631634821 --> @GyokuroT commented on GitHub (May 20, 2020): > > > Hey @JohnCMoon, thanks for bringing this to my attention. I just pushed an update that allows for configuration of a root URL using the config section on the main page of the app. Try setting that to your host URL and let me know if that ends up working for you. > > Oh and you'll likely need to remove the existing search config for Whoogle search from your Firefox preferences before trying this again (in case you haven't done that already). I also run Whoogle behind a reverse proxy. Does it have any adverse effects if some random internet user changes the root URL?
Author
Owner

@JohnCMoon commented on GitHub (May 23, 2020):

Hmm, yeah I suppose it would. Might want to keep this option server-side.

<!-- gh-comment-id:633124253 --> @JohnCMoon commented on GitHub (May 23, 2020): Hmm, yeah I suppose it would. Might want to keep this option server-side.
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#9
No description provided.