getlago / lago-front

Open Source Metering and Usage Based Billing
https://www.getlago.com/
GNU Affero General Public License v3.0
123 stars 56 forks source link

[BUG] Cannot login on Firefox, login page attempts to access https://front-url.com/api-url.com/graphql on Firefox, it should not #1804

Open doctorpangloss opened 2 weeks ago

doctorpangloss commented 2 weeks ago

Describe the bug On Firefox, visiting the login page

To Reproduce

  1. Visit the login page.
  2. Enter a username and password with the Firefox Network tab open.
  3. Click Log In
  4. Observe a 405 error on the graphql endpoint, because it appears to be accessing https://front-url.com/api-url.com/graphql

Expected behavior On Chrome, the way the address is formatted seems to work for login

Screenshots console error logs show

[Network error]: {"name":"ServerError","response":{},"statusCode":405,"result":"<html>\r\n<head><title>405 Not Allowed</title></head>\r\n<body>\r\n<center><h1>405 Not Allowed</h1></center>\r\n<hr><center>nginx/1.27.1</center>\r\n</body>\r\n</html>\r\n"}

which is expected as this is the result for trying to POST to a static URL on nginx.

Environment infos

Environment informations

App environment : production API URL : ... Version : 1.0.0 (but it's really 1.10.0 docker images)

Additional context both LAGO_API_URL and LAGO_FRONT_URL are written in the form https://domain.com

vincent-pochet commented 2 weeks ago

Hello @doctorpangloss, thank you for reporting this issue.

Did you set the API_URL for the front docker image as well? It should point to the same value as the LAGO_API_URL one defined for the api image