From c0dcaabbdec53ce703b01b8e5ba2458123606879 Mon Sep 17 00:00:00 2001 From: Emile Bex Date: Wed, 1 Dec 2021 15:17:01 +0100 Subject: [PATCH] chore(universal links): add universal link files for android and iOS --- .well-known/apple-app-site-association | 15 ----------- .well-known/assetlinks.json | 13 --------- next.config.js | 22 +++++++++++++++ public/.well-known/apple-app-site-association | 27 +++++++++++++++++++ public/.well-known/assetlinks.json | 24 +++++++++++++++++ server.js | 2 +- 6 files changed, 74 insertions(+), 29 deletions(-) delete mode 100644 .well-known/apple-app-site-association delete mode 100644 .well-known/assetlinks.json create mode 100644 public/.well-known/apple-app-site-association create mode 100644 public/.well-known/assetlinks.json diff --git a/.well-known/apple-app-site-association b/.well-known/apple-app-site-association deleted file mode 100644 index f329e8eb..00000000 --- a/.well-known/apple-app-site-association +++ /dev/null @@ -1,15 +0,0 @@ -{ - "applinks": { - "apps": [], - "details": [ - { - "appID": "RT7X9LLTN6.social.entourage.entourageios", - "paths": [ "*" ] - }, - { - "appID": "RT7X9LLTN6.social.entourage.entourageios.beta", - "paths": [ "*" ] - } - ] - } -} diff --git a/.well-known/assetlinks.json b/.well-known/assetlinks.json deleted file mode 100644 index 902ede94..00000000 --- a/.well-known/assetlinks.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "relation": ["delegate_permission/common.handle_all_urls"], - "target": { - "namespace": "android_app", - "package_name": "social.entourage.android", - "sha256_cert_fingerprints": [ - "DA:C4:85:E4:D7:9F:59:E0:49:EE:A8:63:70:76:27:F9:1A:5C:09:79:F5:A1:66:81:3B:DB:76:cd:7D:64:2C:49", - "90:2D:BA:19:30:A7:A5:A9:3F:ab:B5:EA:72:DC:E0:3F:3F:AD:F4:6F:33:2C:3A:FA:12:8F:6C:61:C4:CA:6F:37" - ] - } - } -] diff --git a/next.config.js b/next.config.js index 860184c7..9a23936b 100644 --- a/next.config.js +++ b/next.config.js @@ -68,4 +68,26 @@ module.exports = { }, ] }, + async headers() { + return [ + { + source: '/.well-known/apple-app-site-association', + headers: [ + { + key: 'Content-Type', + value: 'application/json', + }, + ], + }, + { + source: '/.well-known/assetlinks.json', + headers: [ + { + key: 'Content-Type', + value: 'application/json', + }, + ], + }, + ]; + }, } diff --git a/public/.well-known/apple-app-site-association b/public/.well-known/apple-app-site-association new file mode 100644 index 00000000..973b7490 --- /dev/null +++ b/public/.well-known/apple-app-site-association @@ -0,0 +1,27 @@ +{ + "webcredentials": { + "apps": [ + "RT7X9LLTN6.social.entourage.entourageios", + "RT7X9LLTN6.social.entourage.entourageios.beta" + ] + }, + "applinks": { + "apps": [], + "details": [ + { + "appID": "RT7X9LLTN6.social.entourage.entourageios", + "paths": [ + "/", + "/actions/*" + ] + }, + { + "appID": "RT7X9LLTN6.social.entourage.entourageios.beta", + "paths": [ + "/", + "/actions/*" + ] + } + ] + } +} diff --git a/public/.well-known/assetlinks.json b/public/.well-known/assetlinks.json new file mode 100644 index 00000000..48ab9bde --- /dev/null +++ b/public/.well-known/assetlinks.json @@ -0,0 +1,24 @@ +[ + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "social.entourage.android", + "sha256_cert_fingerprints": [ + "DA:C4:85:E4:D7:9F:59:E0:49:EE:A8:63:70:76:27:F9:1A:5C:09:79:F5:A1:66:81:3B:DB:76:cd:7D:64:2C:49", + "90:2D:BA:19:30:A7:A5:A9:3F:ab:B5:EA:72:DC:E0:3F:3F:AD:F4:6F:33:2C:3A:FA:12:8F:6C:61:C4:CA:6F:37" + ] + } + }, + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "social.entourage.android.preprod.debug", + "sha256_cert_fingerprints": [ + "DA:C4:85:E4:D7:9F:59:E0:49:EE:A8:63:70:76:27:F9:1A:5C:09:79:F5:A1:66:81:3B:DB:76:cd:7D:64:2C:49", + "90:2D:BA:19:30:A7:A5:A9:3F:ab:B5:EA:72:DC:E0:3F:3F:AD:F4:6F:33:2C:3A:FA:12:8F:6C:61:C4:CA:6F:37" + ] + } + } +] diff --git a/server.js b/server.js index 49307963..f009cc07 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.prepare() // TODO specify origin server.use(cors()); - + server.get('*', (req, res) => { return handle(req, res) })