Created
December 23, 2016 20:50
-
-
Save jamesholcomb/fed054cf30652ffcef371128aa76686f to your computer and use it in GitHub Desktop.
apple-app-site-association middleware for express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = function (root) { | |
return function (req, res) { | |
const aasa = path.join(root, 'apple-app-site-association') | |
res.set('Content-Type', 'application/pkcs7-mime') | |
res.status(200) | |
res.sendFile(aasa) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i think it is better if you replaced root with __dirname
const aasa = path.join(__dirname, 'apple-app-site-association')