@@ -33,7 +33,7 @@ export default defineConfig({
3333 {
3434 label : "Introduction" ,
3535 link : "/introduction" ,
36- } ,
36+ } ,
3737 {
3838 label : "Rules of Engagement" ,
3939 link : "/rules-of-engagement" ,
@@ -103,6 +103,33 @@ export default defineConfig({
103103 // https://discord.com/channels/830184174198718474/1070481941863878697/1211398665101516842
104104 vite : {
105105 plugins : [
106+ {
107+ name : "strip-permissions-policy" ,
108+ configureServer ( server ) {
109+ server . middlewares . use ( ( req , res , next ) => {
110+ const orig = res . writeHead ;
111+ res . writeHead = function ( ...args ) {
112+ try {
113+ res . removeHeader ( "Permissions-Policy" ) ;
114+ } catch { }
115+ return orig . apply ( this , args ) ;
116+ } ;
117+ next ( ) ;
118+ } ) ;
119+ } ,
120+ configurePreviewServer ( server ) {
121+ server . middlewares . use ( ( req , res , next ) => {
122+ const orig = res . writeHead ;
123+ res . writeHead = function ( ...args ) {
124+ try {
125+ res . removeHeader ( "Permissions-Policy" ) ;
126+ } catch { }
127+ return orig . apply ( this , args ) ;
128+ } ;
129+ next ( ) ;
130+ } ) ;
131+ } ,
132+ } ,
106133 {
107134 name : "custom-page-props" ,
108135 transform : ( code , id ) => {
0 commit comments