Appwrite Fix 1.
Hopefully i can create accounts
This commit is contained in:
53
FIX_CORS.md
Normal file
53
FIX_CORS.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# CORS-Fehler beheben - Schnellanleitung
|
||||
|
||||
## Problem
|
||||
Appwrite blockiert Requests von `https://emailsorter.webklar.com` weil nur `https://localhost` als Origin erlaubt ist.
|
||||
|
||||
## Lösung (Automatisch)
|
||||
|
||||
### Option 1: Node.js Script (empfohlen)
|
||||
```bash
|
||||
cd server
|
||||
npm run setup:platform
|
||||
```
|
||||
|
||||
**Falls der API Key nicht die richtigen Scopes hat:**
|
||||
1. Gehe zu https://appwrite.webklar.com
|
||||
2. Öffne dein Projekt → Settings → API Credentials
|
||||
3. Erstelle einen neuen API Key mit Scopes: `platforms.read` und `platforms.write`
|
||||
4. Aktualisiere `APPWRITE_API_KEY` in `server/.env`
|
||||
5. Führe das Script erneut aus
|
||||
|
||||
### Option 2: PowerShell Script (Windows)
|
||||
```powershell
|
||||
cd scripts
|
||||
.\setup-appwrite-cors-auto.ps1
|
||||
```
|
||||
|
||||
## Lösung (Manuell)
|
||||
|
||||
1. **Gehe zu Appwrite Console:**
|
||||
- https://appwrite.webklar.com
|
||||
|
||||
2. **Öffne dein Projekt**
|
||||
|
||||
3. **Gehe zu Settings → Platforms** (oder "Web" in manchen Versionen)
|
||||
|
||||
4. **Klicke auf "Add Platform" oder "Create Platform"**
|
||||
|
||||
5. **Wähle "Web" als Platform-Typ**
|
||||
|
||||
6. **Fülle die Felder aus:**
|
||||
- **Name:** `Production`
|
||||
- **Hostname:** `emailsorter.webklar.com`
|
||||
- **Origin:** `https://emailsorter.webklar.com` (falls gefragt)
|
||||
|
||||
7. **Speichere die Änderungen**
|
||||
|
||||
8. **Warte 1-2 Minuten** (Cache)
|
||||
|
||||
9. **Teste die Anwendung** - CORS-Fehler sollten jetzt verschwunden sein
|
||||
|
||||
## Weitere Hilfe
|
||||
|
||||
Siehe `docs/setup/APPWRITE_CORS_SETUP.md` für detaillierte Anweisungen.
|
||||
Reference in New Issue
Block a user