change the domain and add the api key to the script

This commit is contained in:
2026-07-24 18:18:22 +07:00
parent cb95cef763
commit 0ef528648d
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -39,7 +39,7 @@ API_TOKEN=<paste output of: openssl rand -hex 32>
ALLOWED_ORIGINS=https://asuracomic.net,https://asurascans.com,https://demonicscans.org
# Required for the Traefik override.
MANGA_API_HOST=manga-api.yourdomain.com
MANGA_API_HOST=manga-api.violetcrown.my.id
# Only if your Traefik setup differs from these defaults:
# PROXY_NETWORK=proxy
@@ -85,21 +85,21 @@ Give Traefik a few seconds to issue the cert, then:
```bash
# Health (no auth) — must be valid TLS, no cert warning.
curl -s https://manga-api.yourdomain.com/healthz # -> ok
curl -s https://manga-api.violetcrown.my.id/healthz # -> ok
# Auth enforced.
curl -s -o /dev/null -w '%{http_code}\n' \
https://manga-api.yourdomain.com/bookmarks # -> 401
https://manga-api.violetcrown.my.id/bookmarks # -> 401
TOKEN=$(grep -E '^API_TOKEN=' .env | cut -d= -f2)
curl -s -H "Authorization: Bearer $TOKEN" \
https://manga-api.yourdomain.com/bookmarks # -> []
https://manga-api.violetcrown.my.id/bookmarks # -> []
# CORS preflight from a real site origin.
curl -s -i -X OPTIONS \
-H 'Origin: https://asurascans.com' \
-H 'Access-Control-Request-Method: PUT' \
https://manga-api.yourdomain.com/bookmarks/x | grep -i access-control
https://manga-api.violetcrown.my.id/bookmarks/x | grep -i access-control
# -> Access-Control-Allow-Origin: https://asurascans.com (+ Methods/Headers)
```