mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 12:15:50 +03:00
[GH-ISSUE #937] [BUG] Images are empty when using subdirectory reverse proxy #581
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
Deployment Method
runexecutableVersion of Whoogle Search
Desktop (please complete the following information):
Smartphone (please complete the following information):
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;
}
@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.
@b1ggi commented on GitHub (Jan 30, 2023):
fixed, thank you