From 0ef528648d8845e128e0b3efdaf5d4e08de00195 Mon Sep 17 00:00:00 2001 From: sulthan Date: Fri, 24 Jul 2026 18:18:22 +0700 Subject: [PATCH] change the domain and add the api key to the script --- DEPLOY.md | 10 +++++----- userscript/manga-bookmark.user.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DEPLOY.md b/DEPLOY.md index 83fb70d..2bbb2ec 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -39,7 +39,7 @@ API_TOKEN= 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) ``` diff --git a/userscript/manga-bookmark.user.js b/userscript/manga-bookmark.user.js index 8eb294f..fc46fec 100644 --- a/userscript/manga-bookmark.user.js +++ b/userscript/manga-bookmark.user.js @@ -17,8 +17,8 @@ // ============================================================ // CONFIG — fill these in before installing. // ============================================================ - const API_BASE = "https://manga-api.example.com"; // your backend origin, no trailing slash - const API_TOKEN = "PASTE_YOUR_API_TOKEN_HERE"; // must equal backend API_TOKEN + const API_BASE = "https://manga-api.violetcrown.my.id"; // your backend origin, no trailing slash + const API_TOKEN = "40d79969b5442f90df4fe306a092c7c50e7b4a7a98099f98cc398f4fb374b1df"; // must equal backend API_TOKEN // Safe in Bromite's isolated world: the page's own JS cannot read these. const CACHE_KEY = "mangabm:cache";