Closed Repsay closed 3 months ago
Resolution: The issue was identified as being related to the localStorage in the browser, which retained the old URL (localhost:8080) that was set before the .env changes were applied. This outdated value persisted even after force reloading the page without cache.
Solution: To resolve this issue, you need to manually clear the localStorage in your browser. Here are the steps:
1. Open your browser’s Developer Tools (usually accessible by pressing F12 or Ctrl+Shift+I).
2. Navigate to the Application tab.
3. Under Storage, locate Local Storage.
4. Select the entry corresponding to your site (e.g., http://new_server.intern:8080).
5. Manually clear the stored data.
After clearing the localStorage, the frontend should correctly load the updated configuration from assets/config.json, and the login requests should be sent to the new server URL as expected.
Version Information
docker:latest
Hashcat
No response
Description
When hosting the Docker Compose setup on a server other than localhost, I need to change the .env variable for
HASHTOPOLIS_BACKEND_URL
. After updating this value, the frontend console logs the following:The content of
assets/config.json
appears to be correct. However, when attempting to log in on the homepage, the request is still sent tohttp://localhost:8080/api/v2/auth/token
instead of the new server URL.Steps to Reproduce:
HASHTOPOLIS_BACKEND_URL
in the .env file tohttp://new_server.intern:8080/api/v2
.Expected Behavior: The login request should be sent to
http://new_server.intern:8080/api/v2/auth/token
.Actual Behavior: The login request is sent to
http://localhost:8080/api/v2/auth/token
.Additional Information:
http://new_server.intern:8080/assets/config.json
directly works, and this request is visible in the frontend container logs.assets/config.json
as expected.localhost:8080
with mynew_server.intern:8080
in all js sources the login submit sends tolocalhost:8080