Skip to content

Commit

Permalink
Merge pull request #723 from iron-fish/rahul/turn-upgrade-insecure-re…
Browse files Browse the repository at this point in the history
…quests-off-in-dev

Turns the upgrade-insecure-requests directive off in development mode
  • Loading branch information
patnir authored Oct 14, 2024
2 parents 70d6613 + ac972f6 commit b4a4168
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const nextConfig = {
},
},
async headers() {
const isDev = process.env.NODE_ENV === "development"

return [
{
source: "/:path*",
Expand All @@ -31,7 +33,7 @@ object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests;
${isDev ? '' : 'upgrade-insecure-requests;'}
`.replace(/\n/g, ""),
},
],
Expand Down

0 comments on commit b4a4168

Please sign in to comment.