[GH-ISSUE #937] [BUG] Images are empty when using subdirectory reverse proxy #581

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

Originally created by @b1ggi on GitHub (Jan 24, 2023).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/937

Describe the bug
I use Swag Reverse Proxy + Docker-compose deployment to access through public dns my whoogle instance with reverse proxy subdirectory method and WHOOGLE_PREFIX_URL set to /whoogle and WHOOGLE_CONFIG_URL set to https://domain.org/whoogle/.
Everything works so far, but the images are linking only to the domain instead of domain+subdirectory

e.g. domain is domain.org
whoogle subdirectory url is https://domain.org/whoogle
Search results, config, everything works except images are empty.
When i look at the image url it points to https://domain.org/element?url=XYZ instead of https://domain.org/whoogle/element?url=XYZ

i think WHOOGLE_URL_PREFIX has to be patched to use also image links. #715

accessing through http://ip:port works just fine

ADDITIONALY: firefox search engine addition did not work out of the box, firefox wanted to add https://domain.org/whoogle/opensearch.xml, but couldnt download it. i had to workaround to add the search engine. maybe it is a different problem.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://domain.org/whoogle
  2. Enter Search word
  3. Click images
  4. Empty Images

Deployment Method

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

Version of Whoogle Search

  • [x ] Latest build from [dockerhub] 0.8.1
  • Version [version number]
  • Not sure

Desktop (please complete the following information):

Smartphone (please complete the following information):

  • Device: [e.g. iPhone 13 pro max]
  • OS: [ios 16.2]
  • Browser [brave]
  • Version [latest]

Additional context

Reverse Proxy config for Swag:

if ($lan-ip = yes) { set $geo-whitelist yes; }
if ($geo-whitelist = no) { return 404; }

location /whoogle {
return 301 $scheme://$host/whoogle/;
}

location ^~ /whoogle/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app wireguard-gluetun-1;
set $upstream_port 5000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

#this headers are in proxy.conf set

proxy_set_header Connection $connection_upgrade;
proxy_set_header Early-Data $ssl_early_data;
proxy_set_header Host $host;
proxy_set_header Proxy "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Method $request_method;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Uri $request_uri;
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
proxy_set_header X-Real-IP $remote_addr;

}

Originally created by @b1ggi on GitHub (Jan 24, 2023). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/937 **Describe the bug** I use Swag Reverse Proxy + Docker-compose deployment to access through public dns my whoogle instance with reverse proxy subdirectory method and WHOOGLE_PREFIX_URL set to /whoogle and WHOOGLE_CONFIG_URL set to https://domain.org/whoogle/. Everything works so far, but the images are linking only to the domain instead of domain+subdirectory e.g. domain is domain.org whoogle subdirectory url is https://domain.org/whoogle Search results, config, everything works except images are empty. When i look at the image url it points to https://domain.org/element?url=XYZ instead of https://domain.org/whoogle/element?url=XYZ i think WHOOGLE_URL_PREFIX has to be patched to use also image links. #715 accessing through http://ip:port works just fine ADDITIONALY: firefox search engine addition did not work out of the box, firefox wanted to add https://domain.org/whoogle/opensearch.xml, but couldnt download it. i had to workaround to add the search engine. maybe it is a different problem. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://domain.org/whoogle 2. Enter Search word 3. Click images 4. Empty Images **Deployment Method** - [ ] Heroku (one-click deploy) - [x ] Docker - [ ] `run` executable - [ ] pip/pipx - [ ] Other: [describe setup] **Version of Whoogle Search** - [x ] Latest build from [dockerhub] 0.8.1 - [ ] Version [version number] - [ ] Not sure **Desktop (please complete the following information):** - OS: [Windows] - Browser [brave windows, but also firefox] - Version [[Version 1.47.171 Chromium: 109.0.5414.87 (Offizieller Build) (64-Bit)](https://brave.com/latest/)] **Smartphone (please complete the following information):** - Device: [e.g. iPhone 13 pro max] - OS: [ios 16.2] - Browser [brave] - Version [latest] **Additional context** Reverse Proxy config for Swag: if ($lan-ip = yes) { set $geo-whitelist yes; } if ($geo-whitelist = no) { return 404; } location /whoogle { return 301 $scheme://$host/whoogle/; } location ^~ /whoogle/ { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app wireguard-gluetun-1; set $upstream_port 5000; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; #this headers are in proxy.conf set proxy_set_header Connection $connection_upgrade; proxy_set_header Early-Data $ssl_early_data; proxy_set_header Host $host; proxy_set_header Proxy ""; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Method $request_method; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-Uri $request_uri; proxy_set_header X-Original-URL $scheme://$http_host$request_uri; proxy_set_header X-Real-IP $remote_addr; }
kerem 2026-02-25 20:36:04 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@benbusby commented on GitHub (Jan 30, 2023):

This should be fixed now (docker image will be updated shortly), but let me know if you're still having issues after you've updated your whoogle image.

<!-- gh-comment-id:1409197555 --> @benbusby commented on GitHub (Jan 30, 2023): This should be fixed now (docker image will be updated shortly), but let me know if you're still having issues after you've updated your whoogle image.
Author
Owner

@b1ggi commented on GitHub (Jan 30, 2023):

fixed, thank you

<!-- gh-comment-id:1409434586 --> @b1ggi commented on GitHub (Jan 30, 2023): > fixed, thank you
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#581
No description provided.