dunglas / mercure

🪽 An open, easy, fast, reliable and battery-efficient solution for real-time communications
https://mercure.rocks
GNU Affero General Public License v3.0
3.98k stars 297 forks source link

[Bug]: Development UI not working via proxy #951

Open alexz707 opened 2 months ago

alexz707 commented 2 months ago

When accessing the dev UI via a nginx proxy the dev UI will load but won't work because it does not find the app.js file. Maybe this is an intended behaviour but I did not find something in the docs.

I use the docker image and my proxy nginx config is:

   location /hub {
        proxy_pass http://mercure/.well-known/mercure;
        proxy_read_timeout 24h;
        proxy_http_version 1.1;
        proxy_set_header Connection "";

        ## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

When I access the container over an exposed port everything is working. But as soon as I use the proxy path it doesn't find the app.js file.

Bildschirmfoto 2024-09-16 um 10 36 38

Regards Alex

filoucrackeur commented 8 hours ago

same problems with bulma.min.css when you are hosting mercure service in private network not connected to internet .

@dunglas is it possible do not use cdn for assets and includes them directely ?

cordialy

dunglas commented 7 hours ago

We're working on a revamp of the profiler. We'll bundle the assets for the new version.