|
@@ -160,18 +160,16 @@ 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) => {
|
|
|
+ const content = JSON.stringify({
|
|
|
+ associatedApplications: [
|
|
|
+ { applicationId: process.env.COMPANION_ONEDRIVE_KEY }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ res.header('Content-Length', `${content.length}`)
|
|
|
// 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: [
|
|
|
- {
|
|
|
- applicationId: process.env.COMPANION_ONEDRIVE_KEY
|
|
|
- }
|
|
|
- ]
|
|
|
- })
|
|
|
- )
|
|
|
+ res.end(content)
|
|
|
})
|
|
|
}
|
|
|
|