Files
Webklar/docs/APPWRITE-CORS.md
Basilosaurusrex 82668796d6 appwrite anbindung
2026-02-06 18:22:04 +01:00

33 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Appwrite CORS / Plattformen einrichten
Wenn das Kontaktformular mit **403 (Forbidden)** oder **CORS** fehlschlägt, fehlt deine Origin in Appwrite.
## In der Appwrite Console
1. Öffne **https://appwrite.webklar.com** (oder deine Appwrite-Installation).
2. Wähle dein **Projekt** (Project ID: `696b82270034001dab69`).
3. Gehe zu **Settings** (Projekt-Einstellungen).
4. Unter **Platforms** (Plattformen) siehst du z.B. eine Web-App mit `http://localhost:8080`.
## Erlaubte Origins hinzufügen
Du musst **jede URL**, von der aus die Webseite läuft, als **Plattform** anlegen (oder die bestehende Web-Plattform um weitere Hostnamen erweitern, falls deine Appwrite-Version das unterstützt).
Typischerweise:
| Umgebung | URL (Origin) |
|----------|----------------|
| Lokal / Dev | `http://localhost:8080` |
| Server (IP) | `http://100.84.12.11:8080` |
| Produktion | `https://webklar.com` (bzw. deine echte Domain) |
### Vorgehen
- **Neue Plattform** → **Web App** anlegen:
- **Name:** z.B. „Webklar Produktion“
- **Hostname:** `webklar.com` (ohne https://)
Oder für die IP: `100.84.12.11` (und ggf. Port in den Einstellungen, falls nötig).
- Oder in der **bestehenden** Web-App alle benötigten Hostnames eintragen (je nach Appwrite-Version: mehrere Hostnames oder mehrere Web-Apps).
Nach dem Speichern sind die neuen Origins erlaubt und der CORS-Fehler sollte verschwinden. Seite und Kontaktformular neu laden und testen.