From 98c9febca67a2d38e6925ec15b21c4b64646f586 Mon Sep 17 00:00:00 2001 From: Mikhail Bakalov Date: Fri, 9 Jun 2023 11:34:16 -0700 Subject: [PATCH] Example serving aasa static file --- client/public/apple-app-site-association.json | 3 +++ server/src/app.ts | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 client/public/apple-app-site-association.json diff --git a/client/public/apple-app-site-association.json b/client/public/apple-app-site-association.json new file mode 100644 index 0000000..d0ae716 --- /dev/null +++ b/client/public/apple-app-site-association.json @@ -0,0 +1,3 @@ +{ + "test": "test" +} diff --git a/server/src/app.ts b/server/src/app.ts index 894fe44..10379e6 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -17,6 +17,7 @@ import { ERROR_PAYLOAD_500 } from './constants'; const app = express(); app.use(express.static('public')); + app.disable('x-powered-by'); app.use((req, res, next) => { @@ -43,6 +44,10 @@ app.get('/visit', (_, res) => { res.sendFile(path.join(__dirname, 'public/visit.html')); }); +app.get('/.well-known/apple-app-site-association', (_, res) => { + res.sendFile(path.join(__dirname, 'public/apple-app-site-association.json')); +}); + const config = getServerConfig(); const surveyDBHandler = createSurveyDBHandler(config);