|
@@ -160,19 +160,17 @@ if (process.env.COMPANION_PATH) {
|
|
|
|
|
|
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 =
|
|
|
-`{
|
|
|
- "associatedApplications": [
|
|
|
- {
|
|
|
- "applicationId": "${process.env.COMPANION_ONEDRIVE_KEY}"
|
|
|
- }
|
|
|
- ]
|
|
|
-}`
|
|
|
+ const content = JSON.stringify({
|
|
|
+ associatedApplications: [
|
|
|
+ { applicationId: process.env.COMPANION_ONEDRIVE_KEY }
|
|
|
+ ]
|
|
|
+ })
|
|
|
res.header('Content-Length', `${Buffer.byteLength(content, 'utf8')}`)
|
|
|
|
|
|
|
|
|
res.writeHead(200, { 'Content-Type': 'application/json' })
|
|
|
- res.end(content)
|
|
|
+ res.write(content)
|
|
|
+ res.end()
|
|
|
})
|
|
|
}
|
|
|
|