crystian / ComfyUI-Crystools

A powerful set of tools for ComfyUI
MIT License
697 stars 33 forks source link

Resource monitor doesn't work when running Comfy on a subpath #114

Open Rafaeltheraven opened 2 weeks ago

Rafaeltheraven commented 2 weeks ago

Describe the bug
Crystools tries to make requests to /scripts/app.js, /scripts/api.js and /scripts/widgets.js. Because of the leading /, it's trying to get these from the root, but I am running ComfyUI on the /comfy/ subpath, causing the requests to 404 and the plugin to fail loading.

To Reproduce
Run ComyUI on a subpath. Install crystools.

Expected behavior
Request from the proper /comfy/scripts/ path (or whatever anyone's subpath may be).

Additional context
Relevant Nginx config looks as follows:

location /comfy/ {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        #Websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;

        proxy_pass http://localhost:{PORT}/;
}
crystian commented 1 week ago

I tired it in the pass, I'll try now with lots of changes from comfy