Skip to content

Commit 5c6068d

Browse files
committed
docs: add info on custom response headers
1 parent 85e1d7f commit 5c6068d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ In order to deliver the correct format to a visitor's browser, this uses a Netli
5353
site may not support Edge Functions, in which case it will instead fall back to delivering the original file format. You
5454
may also manually disable the Edge Function by setting the environment variable `NEXT_DISABLE_EDGE_IMAGES` to `true`.
5555

56+
## Returning custom response headers on images handled by `ipx`
57+
58+
Should you wish to return custom response headers on images handled by the [`netlify-ipx`](https://github.com/netlify/netlify-ipx) package, you can add them within your project's `netlify.toml` by targeting the `/_next/image/*` route:
59+
60+
```
61+
[[headers]]
62+
for = "/_next/image/*"
63+
64+
[headers.values]
65+
Strict-Transport-Security = "max-age=31536000"
66+
X-Test = 'foobar'
67+
```
68+
5669
## Next.js Middleware on Netlify
5770

5871
Next.js Middleware works out of the box on Netlify, but check out the

0 commit comments

Comments
 (0)