https://github.com/ide/next-error-headers
https://github.com/ide/next-error-headers
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ide/next-error-headers
- Owner: ide
- License: mit
- Created: 2022-02-12T20:37:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-12T23:05:46.000Z (over 4 years ago)
- Last Synced: 2025-02-10T00:16:26.805Z (over 1 year ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# next-error-headers
Demo showing that Next.js serves custom headers even for error pages (e.g. 404s).
```
yarn
yarn next build
yarn next start
# Expect custom headers to be set
curl -s -D - -o /dev/null http://localhost:3000/static/nyan.png
# Custom headers are still set even though a 404 page is served
curl -s -D - -o /dev/null http://localhost:3000/static/missing
```