File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,27 @@ if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) {
125125 ) ;
126126}
127127
128+ // routing to serve files in .well-known with specific content type
129+ // temporary addition for the apple pay integration with donorbox
130+ app . use (
131+ '/.well-known/apple-developer-merchantid-domain-association' ,
132+ ( req , res , next ) => {
133+ const filePath = path . join (
134+ __dirname ,
135+ '../public/.well-known/apple-developer-merchantid-domain-association'
136+ ) ;
137+
138+ res . setHeader ( 'Content-Type' , 'text/plain' ) ;
139+
140+ res . sendFile ( filePath , ( err ) => {
141+ if ( err ) {
142+ console . error ( 'Error serving file:' , err ) ;
143+ next ( err ) ;
144+ }
145+ } ) ;
146+ }
147+ ) ;
148+
128149// Body parser, cookie parser, sessions, serve public assets
129150app . use (
130151 '/locales' ,
You can’t perform that action at this time.
0 commit comments