From 8826f588a0b96d11d793ab5a1a256eae20d17b29 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 2 Jul 2025 18:37:36 +0200 Subject: [PATCH] Add cross origin headers for shared memory usage (#454) --- next.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/next.config.js b/next.config.js index cb09092..6210192 100644 --- a/next.config.js +++ b/next.config.js @@ -15,6 +15,23 @@ const nextConfig = { return config; }, + headers: async () => { + return [ + { + source: '/(.*)', + headers: [ + { + key: 'Cross-Origin-Opener-Policy', + value: 'same-origin', + }, + { + key: 'Cross-Origin-Embedder-Policy', + value: 'credentialless', + }, + ], + }, + ]; + }, }; module.exports = nextConfig;