Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapdrop instance behind Apache Proxy: How to implement X-Forwarded-For #516

Open
Tone866 opened this issue Oct 15, 2022 · 1 comment · May be fixed by Centaurioun/snapdrop#3
Open

snapdrop instance behind Apache Proxy: How to implement X-Forwarded-For #516

Tone866 opened this issue Oct 15, 2022 · 1 comment · May be fixed by Centaurioun/snapdrop#3

Comments

@Tone866
Copy link

Tone866 commented Oct 15, 2022

I'm trying to run snapdrop behind a apache reverse proxy.
Everything works, except that I can see every hosts instead only that one in my network.
I don't know how I can implement the X-Forwarded-For part with apache.
I googled a bit but nothing works.
Can anyone help?

This is my current config:

RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /snapdrop/(.*) ws://localhost:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /snapdrop/(.*) http://localhost:8080/$1 [P,L]

ProxyPass               /snapdrop/     http://localhost:8080/
ProxyPassReverse        /snapdrop/     http://localhost:8080/
ProxyPass               /snapdrop/     ws://localhost:8080/

<Proxy https://localhost:8080/>
    AllowOverride None
    Order allow,deny
    Allow from all
</Proxy>
@mwy001
Copy link

mwy001 commented Nov 3, 2022

The issue is related to the linuxserver/docker-snapdrop's default nginx config, which will resolve all clients' IP to the IP address of reverse proxy , check this:
linuxserver/docker-snapdrop@d07b0fc#diff-b798d7ad17e8cc7e11749264de70d9201e8767881b0df5980369a5e2edc6f804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants