phenomen / flc

Foundry Lightweight Client (FLC) is a bloat-free client app for Foundry VTT

Home Page:https://flc.ruleplaying.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Nginx was responding with 400 automatically, due to the API call not containing the Host header.
  2. 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:

  1. Adding "Host": new URL(server.host).hostname into the headers of API status call
  2. Replacing tauri_fetch with plain fetch (+ 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.