You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server {
...
server_name example.com;
location / {
... # do other things
}
location /app/ {
proxy_pass http://[::1]:8080;
}
location /app/_trunk/ws {
proxy_pass http://[::1]:8080;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}
}
In this setup, public_url must be set in Trunk.toml for the SPA to load:
[Build]
public_url = "/app/"
The SPA must also be made aware of the pathname to route properly.
In this configuration, Trunk is looking for the WS socket in the wrong place at https://example.com/_trunk/ws. This affects both thedodd/trunk and ctron/trunk.
It would be nice if the socket location also followed public_url or if it could be configured separately.
(I filed this issue here instead of upstream because it seems more active)
Thank you!
The text was updated successfully, but these errors were encountered:
I think that's a regression by the PR from trunk-rs#500, and it should be fixed on main. … But also the second case never worked.
So yes, I think it makes sense to somehow make this configurable. As we have a ws_protocol argument, we could also add a ws_url (or ws_address?) argument.
As you seem to have a working setup for this, it would be great if you could give it a try.
I would like to use Nginx in front of Trunk when developing, but I am encountering some problems with autoreload.
Trunk serves on
[::1]:8080
. I would like to be able to use both of these configurations:subdomain setup (app.example.com)
[::1]:8080
. This may be the same as __trunk_address__ in WSS url is not getting replaced #9non-root-path setup (example.com/app)
In this setup,
public_url
must be set in Trunk.toml for the SPA to load:The SPA must also be made aware of the pathname to route properly.
In this configuration, Trunk is looking for the WS socket in the wrong place at
https://example.com/_trunk/ws
. This affects both thedodd/trunk and ctron/trunk.It would be nice if the socket location also followed
public_url
or if it could be configured separately.(I filed this issue here instead of upstream because it seems more active)
Thank you!
The text was updated successfully, but these errors were encountered: