We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd88bcd commit 7742fd6Copy full SHA for 7742fd6
server/server.js
@@ -130,14 +130,12 @@ if (process.env.BASIC_USERNAME && process.env.BASIC_PASSWORD) {
130
app.use(
131
'/.well-known/apple-developer-merchantid-domain-association',
132
(req, res, next) => {
133
- const filePath = path.resolve(
134
- __dirname,
135
- '../public/.well-known/apple-developer-merchantid-domain-association'
136
- );
+ const rootPath = path.resolve(__dirname, '../public/.well-known');
+ const fileName = 'apple-developer-merchantid-domain-association';
137
138
res.setHeader('Content-Type', 'text/plain');
139
140
- res.sendFile(filePath, (err) => {
+ res.sendFile(fileName, { root: rootPath }, (err) => {
141
if (err) {
142
console.error('Error serving file:', err);
143
next(err);
0 commit comments