Skip to content

Local development with none-localhost domain without HTTPS #197

@fullheart

Description

@fullheart

Problem

For the locally hosted Convex backend, I use the domain http://site.convex.local instead of http://127.0.0.1:3211 for CONVEX_SITE_ORIGIN during development.

Unfortunately, I get this error with npx convex dev:

The pushed auth config is invalid: Invalid provider domain URL ‘http://site.convex.local’: must use HTTPS

This error is thrown by this validation code:
https://github.com/get-convex/convex-backend/blob/main/crates/common/src/auth.rs#L208-L220

Workaround

As a workaround, I can set the env variable like this CONVEX_SITE_ORIGIN=http://127.0.0.1:3211.

Questions

  1. How can this be resolved so that not only localhost is supported as a domain for local development without HTTPS?
  2. But are there any side effects if I use http://site.convex.local in the frontend React app, but set env variable CONVEX_SITE_ORIGIN=http://127.0.0.1:3211 in docker container?

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