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

[BUG] the module has missing resources when running foundry under a reverse proxy location #14

Open
Snogard opened this issue Jun 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Snogard
Copy link

Snogard commented Jun 1, 2021

Describe the bug
When using foundry under a reverse proxy location, the gsap-core.js module is not loaded.
/scripts/greensock/esm/gsap-core.js

To Reproduce
Steps to reproduce the behavior:

  1. Create a reverse proxy configuration using a location
  2. Start foundry and enable the module in an empty world
  3. Wait for reload

Now if you open the console you should get an error.
If i manually add the location name to the path, then the gsap.core.js is found.
exmaple (if i have foundry under /test location):
does not work: example.com/scripts/greensock/esm/gsap-core.js <-- this is what your modules looks for right now
works: example.com/test/scripts/greensock/esm/gsap-core.js

Expected behavior
Module settings are should be visible and notifications should work

Server:

  • OS: Raspberry Pi OS
  • FVTT 0.7.10
  • Module version 1.2.2
  • Client:
  • OS: Arch Linux
  • Browser: Firefox

Example Nginx config

location /test {
    proxy_http_version 1.1;
        
    proxy_read_timeout 90;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;

    proxy_pass http://localhost:30000;
}

If you need more info feel free to ask :)

@Snogard Snogard added the bug Something isn't working label Jun 1, 2021
@Moerill
Copy link
Owner

Moerill commented Jun 1, 2021

Thanks for the bug report. When i finally get back to fixing this for 0.8.x i'll try to fix this.

As a reminder for me: Switch back to loading the gsap library using the module.json and not as esm module import. (I kinda forgot about doing that.. )

And for clarification: This is not a general reverse proxy issue, only when you put foundry behind a reverse proxy on a subdomain like your-domain.com/something instead of your-domain.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants