The Wayback Machine - https://web.archive.org/web/20260309003551/https://github.com/getlago/lago/issues/348
Skip to content

[BUG]: CORS /graphql letsencrypt #348

@unusualevent

Description

@unusualevent

Describe the bug
The graphql API is served over 3000 instead of proxied via the front/nginx container, various shenanigans ensue

To Reproduce
Steps to reproduce the behavior:

  1. Follow the setup instructions
  2. Adjust the LAGO_FRONT_URL and LAGO_API_URL to be something sensible that isn't localhost
  3. either the front, or the API, aren't really in sync with the right CORS headers
  4. See error

Expected behavior
I... I mean I expect that if it's a frontend that the port of the static javascript and the API itself match. that's... also a basic web standard? it's part of how CORS matching... works?

You can do that like this, probably:

location /graphql {
 proxy_pass http://api:3000;
}

(I have no idea why this isn't the default)

Changing the docs so that LAGO_API_URL is understood as something that needs to be changed

More explanation over whether either variable is supposed to include the protocol https://, the port, and a trailing slash (you have two issues that are contradictory on this and docs that are vague-ish) ((maybe this is a weird quirk of your web framework??))

Screenshots
Could get them? It's similar to the other CORS problems. I suspect one container or another isn't loading .env's? or is using defaults?

Support

  • OS: Mac
  • Browser Firefox
  • Version 125

Additional context
I like trains and web standards <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions