Skip to content

Commit

Permalink
Add CSP for images (#143)
Browse files Browse the repository at this point in the history
* Add csp to image in next config

* Don't optimize images

* Use custom loader instead of middleware

* Remove custom image loader
  • Loading branch information
besated authored Sep 25, 2024
1 parent 9e08d11 commit ebc2847
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const withNextra = require('nextra')({

module.exports = withNextra({
images: {
unoptimized: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
remotePatterns: [
{
protocol: 'https',
Expand Down

0 comments on commit ebc2847

Please sign in to comment.