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

Question - Swag and Dashy #755

Closed
bobcqld53 opened this issue Jun 23, 2022 · 4 comments
Closed

Question - Swag and Dashy #755

bobcqld53 opened this issue Jun 23, 2022 · 4 comments

Comments

@bobcqld53
Copy link

I am using UnRaid to host dashy but cannot get reverse proxy to work via Swag

If I configure Swag -dashy to use authelia - I can log in to authelia Ok but then I get 403 forbidden when re directing to dashy home page.
Dashy docker is configured to use dedicated docker network as per my other reverse proxied containers (All working ok via swag)

@liss-bot
Copy link
Collaborator

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

@jthonen
Copy link

jthonen commented Nov 30, 2022

I am using UnRaid to host dashy but cannot get reverse proxy to work via Swag

If I configure Swag -dashy to use authelia - I can log in to authelia Ok but then I get 403 forbidden when re directing to dashy home page. Dashy docker is configured to use dedicated docker network as per my other reverse proxied containers (All working ok via swag)

any luck on this?

@ehula
Copy link

ehula commented Aug 28, 2024

This was marked closed, but has anyone ever gotten this to work?

@zachwarner
Copy link

I'm super late to this but thought I'd share since I got it to work. @Lissy93 please let me know if I'm doing anything 🔴 stupid 🔴 here.

The key is to allow api access in the proxy conf as a separate location, then allow specific addresses. For example, here's how SWAG allows metrics access to Jellyfin. The whitelisted addresses there are, AFAICT, for same-host and -stack access.

We adapt this as in the following MRE:

glances.subdomain.conf

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name glances.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;
    
    ...

    location / {
        ...

        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app glances;
        set $upstream_port 61208;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location /api {
        allow 192.168.0.0/16;
        allow 10.0.0.0/8;
        allow 172.16.0.0/12;
        allow 127.0.0.0/8;

        deny all;

        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app glances;
        set $upstream_port 61208;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}
conf.yml
...

sections:
    ...
    - name: cpu
      widgets:
        - type: gl-current-cpu
          options:
            hostname: https://glances.EXAMPLE.COM

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

No branches or pull requests

5 participants