Skip to content
Back

Invalid origin despite configured env

  • 1
  • Self Hosted
Zyphen
3 Dec, 2024, 11:44

When trying to register my first user on a self-hosted install I get the following error: (i have redacted my domain for privacy)

TypeScript
[Error] Timestamp: 2024-12-03T11:36:47+00:00
[Error] Method: POST
[Error] URL: /v1/account
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Invalid Origin. Register your new client (appwrite.redacted.xyz) as a new Web platform on your project console dashboard
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 656

Running docker exec appwrite vars, the following are set:

TypeScript
_APP_DOMAIN=appwrite.redacted.xyz
_APP_DOMAIN_TARGET=appwrite.redacted.xyz

This is behind a Caddy reverse proxy, but I have ensured that is properly passing the Host header. Additionally, since the server logs log the proper domain (appwrite.redacted.xyz), I assume the server does know where the request is comming from, but for some reason denies it even though it is in the vars.

TL;DR
When trying to register a user on a self-hosted install, developers are getting an "Invalid Origin" error message despite the correct domain being configured. The error seems related to setting up a new client on the project console dashboard. The Caddy reverse proxy is correctly passing the `Host` header. The issue may be with the project console setup not recognizing the registered domain. Consider rechecking the platform registration on the project console dashboard to ensure the domain is correctly added.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more