companion: set required content type for oneDrive domain verification

This commit is contained in:
ifedapoolarewaju 2019-12-05 02:11:40 +01:00
parent 17ea8e0e48
commit cace48ec72
No known key found for this signature in database
GPG key ID: FF050AA4EEBCE82E

View file

@ -160,7 +160,10 @@ if (process.env.COMPANION_PATH) {
// please do not set a value for COMPANION_ONEDRIVE_DOMAIN_VALIDATION
if (process.env.COMPANION_ONEDRIVE_DOMAIN_VALIDATION === 'true' && process.env.COMPANION_ONEDRIVE_KEY) {
app.get('/.well-known/microsoft-identity-association.json', (req, res) => {
res.json(
// use writeHead to prevent 'charset' from being appended
// https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-configure-publisher-domain#to-select-a-verified-domain
res.writeHead(200, { 'Content-Type': 'application/json' })
res.end(JSON.stringify(
{
associatedApplications: [
{
@ -168,6 +171,7 @@ if (process.env.COMPANION_ONEDRIVE_DOMAIN_VALIDATION === 'true' && process.env.C
}
]
})
)
})
}