A project utilizing Mabinogi's OpenAPI to proview market, horn and more
View Demo
·
Report Bug
·
Request Feature
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
-
Clone the repo
git clone https://github.com/sweatpotato13/erinn.me.git
-
Install dependencies
pnpm install
-
write .env file
cp .env.example .env nano .env
-
Start the development server
pnpm dev
-
or build and start the production server
pnpm build pnpm start
The API proxy trusts only Vercel's x-vercel-forwarded-for header for client
identity and ignores x-forwarded-for. Any reverse proxy placed in front of
Vercel must strip client-supplied x-vercel-forwarded-for values before
forwarding requests.
Configure a single programmatic rate-limit rule in the Vercel Firewall dashboard:
| ID | Path | Limit | Window |
|---|---|---|---|
erinn-api |
/api/* |
120 | 60 seconds |
The rule uses @vercel/firewall with the ID erinn-api. If the rule is
missing or the WAF check fails, requests pass through (fail-open). Local
development and Vercel Preview deployments bypass WAF checks entirely.
To verify the Production WAF path before merging to main:
- Add
ENABLE_PREVIEW_RATE_LIMIT=trueto the Preview environment, scoped to thedevelopbranch, and redeploy it. - Request a protected API route and confirm it returns HTTP 200 with an
X-RateLimit-Limit: 120header. - Remove
ENABLE_PREVIEW_RATE_LIMITafter verification and redeploydevelopto restore the default Preview bypass.
Never add ENABLE_PREVIEW_RATE_LIMIT to Production: Production always applies
the WAF regardless of this variable.
