Skip to content

Frontend trying to query localhost in production #123

@bensventures

Description

@bensventures

I've had a look at the docs and past issues but can't find anything clear.

I have deployed an app on a production server, inside a Docker container (using Dockerfile provided, thanks!). I have setup Nginx as the SSL termination, proxying to the container. If I load a page in a browser with https://www.myapp.com everything loads fine. But when the frontend tries to make a request to the GraphQL endpoint I get an error in the browser console:

Mixed Content: The page at 'https://www.myapp.com/someurl' was loaded over HTTPS, but requested an insecure resource 'http://0.0.0.0:4000/graphql'. This request has been blocked; the content must be served over HTTPS.

Do I need to specify somewhere the base url the frontend should use or something? I've upgraded to the latest CLI but still getting the same issue.

Note: when the page is generated directly from the server (SSR) everything loads fins too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions