Cannot connect with self-hosted foundry with proxy and ssl
Lank891 opened this issue · comments
I've got interested in the project since one of my players cannot use Foundry from a browser. I love it, and I started using it (and recommend all my players to use it tbh).
Apart from some functionalities I'm missing, but this is not about them, I have the following problem,
I'm hosting my Foundry in Oracle Cloud and it is set up with SSL and Nginx. It couldn't detect that my server is on (/api/status
), it seems there were 2 reasons for it:
- Nginx was responding with 400 automatically, due to the API call not containing the
Host
header. - Tauri Fetch didn't recognize the SSL certificate I'm using (not self-signed or anything like that, and I haven't yet seen problems with this certificate)
My workarounds were:
- Adding
"Host": new URL(server.host).hostname
into the headers of API status call - Replacing
tauri_fetch
with plainfetch
(+ small amount of following changes needed for this to work)
Those worked (and my group is using my custom build of 2.9.5), but since this thing is being updated I thought I should share those problems. I can make a PR for that with my changes, although I didn't test them against other foundries, at least yet.
I removed all extraneous server checks and made it possible to join whatever URL you want.