-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add LDAP mobile config and support
Signed-off-by: mathieu.brunot <[email protected]>
- Loading branch information
Showing
8 changed files
with
164 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,12 +68,14 @@ router.post('/autodiscover/autodiscover.xml', autodiscover); | |
router.get('/Autodiscover/Autodiscover.xml', autodiscover); | ||
router.post('/Autodiscover/Autodiscover.xml', autodiscover); | ||
|
||
|
||
// Thunderbird | ||
router.get('/mail/config-v1.1.xml', function *autoconfig() { | ||
this.set('Content-Type', 'application/xml'); | ||
yield this.render('autoconfig'); | ||
}); | ||
|
||
|
||
// iOS / Apple Mail (/[email protected] or /email.mobileconfig?email=username) | ||
router.get('/email.mobileconfig', function *autoconfig() { | ||
let email = this.request.query.email; | ||
|
@@ -99,6 +101,7 @@ router.get('/email.mobileconfig', function *autoconfig() { | |
|
||
const inssl = settings.imap.socket == 'SSL' || settings.imap.socket == 'STARTTLS' ? 'true' : 'false'; | ||
const outssl = settings.smtp.socket == 'SSL' || settings.smtp.socket == 'STARTTLS' ? 'true' : 'false'; | ||
const ldapssl = settings.ldap.socket == 'SSL' || settings.ldap.port == '636' ? 'true' : 'false'; | ||
|
||
this.set('Content-Type', 'application/x-apple-aspen-config; chatset=utf-8'); | ||
this.set('Content-Disposition', `attachment; filename="${filename}"`); | ||
|
@@ -108,10 +111,12 @@ router.get('/email.mobileconfig', function *autoconfig() { | |
username, | ||
domain, | ||
inssl, | ||
outssl | ||
outssl, | ||
ldapssl | ||
}); | ||
}); | ||
|
||
|
||
// Generic support page | ||
router.get('/', function *index() { | ||
yield this.render('index.html'); | ||
|
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
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
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
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
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