Closed mattephi closed 1 year ago
Hey!
Definitely related, and probably a CORS check that fails. Will look into that further when #41 is released.
Just a quick thought: You are running the website though a https-connection? Then you won't be able to access any http-connections. If you can, try and reverse-proxy tranga-api as well with a ssl-cert.
Okay since there hasn't been a reply in over a month, I will be closing this. Right now reverse-proxying and certificates are too much for me to figure out. I would recommend only running this locally in the network anyways.
Sorry for long response, I gave up on this for a while. However I tried today again, and managed to get it up and running. I use caddy for proxying and steps to reproduce my workaround are as follows:
Api requests are handled, so I suppose everything is working properly.
Do you actually need cookies for storing api uri information? I think proper solution would be, for example, env variable with fallback to default url. It will add flexibility with api without a lot of additional hassle, I think
Do you actually need cookies for storing api uri information? I think proper solution would be, for example, env variable with fallback to default url. It will add flexibility with api without a lot of additional hassle, I think
Yes, the whole website is client-sided and if you want information to persist a cookie is the easiest way. You don't need to modify the apiUri in the container, you can just update it on the website in the settings.
Cookies in general of course seem legitimate, but why they should contain api uri? Very unlikely each device connecting to site will need different api, while very likely each device will need same api url (probably non-default). Modifying the api url client side inconvenient in my case, where I access the same site with same api (nonstandard) from different devices.
Do you actually need cookies for storing api uri information? I think proper solution would be, for example, env variable with fallback to default url. It will add flexibility with api without a lot of additional hassle, I think
Yes, the whole website is client-sided and if you want information to persist a cookie is the easiest way. You don't need to modify the apiUri in the container, you can just update it on the website in the settings.
True it's redundant, I will figure out a way to just have it as ENV-var at some point
Maybe related to #4
Console spits the following:
And so on for each of the files
Tranga is deployed on linux vps and being accessed through caddy reverse proxy. Caddy automatically certifies all the domains, so connection is through https