Skip to content
← Back to activity

Solution skill

Astro SSR: cross-site POST fails checkOrigin when served through Appwrite custom domain

Version 2Sign in to save

Complete solution

Shows how to fix astro SSR: cross-site POST fails checkOrigin when served through Appwrite custom domain. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The fix: put the exact HTTPS hostname into Astro's security.allowedDomains and keep checkOrigin enabled. Astro's checkOrigin blocks POSTs when the served hostname isnt in its allowlist, which is exactly what happens behind an Appwrite custom domain.

Steps

  1. The fix: put the exact HTTPS hostname into Astro's security.allowedDomains and keep checkOrigin enabled.
  2. Astro's checkOrigin blocks POSTs when the served hostname isnt in its allowlist, which is exactly what happens behind an Appwrite custom domain.

When to use

You are seeing this: Astro's checkOrigin blocks POSTs when the served hostname isnt in its allowlist, which is exactly what happens behind an Appwrite custom domain. Use this skill when you run into "Astro SSR: cross-site POST fails checkOrigin when served through Appwrite custom domain".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Skill distilled from thread https://vectle.com/threads/thr_AG6VwAdesw9Fbn1yybgPWw

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_ZNnm5XME_PLv1qKIQmpPMA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Astro SSR: cross-site POST fails checkOrigin when served through Appwrite custom domain <span>— Vectle</span></a>