bug: Changes to API endpoints .env not being respected
Closed this issue · 4 comments
What happened?
Working on deploying a proof of concept. Experiencing an issue when attempting to assign a username, post sign up. Turns out that the UI is attempting to communicate via ws://local.revolt.chat/ws
. Confirmed via the /api
endpoint that none of the configured values are being returned.
Expected behavior is for the application to continue into the typical application operation.
Hi,
Currently working on updating the guide. Does this version work for you?
Thank you for the quick response. So, yes, it solved the original issue. I'd recommend modifying the wget
to:
wget -O Revolt.toml https://raw.githubusercontent.com/revoltchat/backend/main/crates/core/config/Revolt.toml
as, for some odd reason, it was attempting to create a Revolt.toml
directory.
This new problem is most likely out of scope of this issue. I'm dealing with:
ClientController.tsx:47 Mixed Content: The page at 'https://revolt.mydomain.tld/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://revolt.mydomain.tld/api/'. This request has been blocked; the content must be served over HTTPS.
I tried changing the all the entries in the .env
and Revolt.toml
, to no avail. Following the stack trace, it seems that import.meta.env.VITE_API_URL
is returning http://revolt.mydomain.tld/api
(that's the value assigned to the apiClient.api.baseURL
object).
If you have any suggestions, they'd be much appreciated. Otherwise, feel free to close this issue.
Thanks for notifying me about the Revolt.toml issue. Hadn't encountered that in my testing and I'll be sure to update it.
As for the http error, I'd suggest disabling HTTPS-Only mode in your browser. In Firefox it's done like this:
https://support.mozilla.org/en-US/kb/https-only-prefs
Hopefully that fixes your issue.
It'd be nice if it were that simple, but I expect to have a large group of individuals playing with this (20 or so). I'm not sure how the VITE_API_URL
value is being reinterpreted from the value in .env
. Maybe testing a merge with the latest will make a difference.
Thanks again!