diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config/default.js | 1 | ||||
-rw-r--r-- | lib/config/environment.js | 1 | ||||
-rw-r--r-- | lib/csp.js | 2 | ||||
-rw-r--r-- | lib/response.js | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/lib/config/default.js b/lib/config/default.js index acfc2157..c3ada982 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -78,6 +78,7 @@ module.exports = { }, // authentication oauth2: { + providerName: undefined, authorizationURL: undefined, tokenURL: undefined, clientID: undefined, diff --git a/lib/config/environment.js b/lib/config/environment.js index 65bacb4e..6737637c 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -75,6 +75,7 @@ module.exports = { clientSecret: process.env.CMD_MATTERMOST_CLIENTSECRET }, oauth2: { + providerName: process.env.CMD_OAUTH2_PROVIDERNAME, baseURL: process.env.CMD_OAUTH2_BASEURL, userProfileURL: process.env.CMD_OAUTH2_USER_PROFILE_URL, userProfileUsernameAttr: process.env.CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR, @@ -9,7 +9,7 @@ var defaultDirectives = { // ^ TODO: Remove unsafe-eval - webpack script-loader issues https://github.com/hackmdio/codimd/issues/594 imgSrc: ['*'], styleSrc: ['\'self\'', '\'unsafe-inline\'', 'https://assets-cdn.github.com'], // unsafe-inline is required for some libs, plus used in views - fontSrc: ['\'self\'', 'https://public.slidesharecdn.com'], + fontSrc: ['\'self\'', 'data:', 'https://public.slidesharecdn.com'], objectSrc: ['*'], // Chrome PDF viewer treats PDFs as objects :/ mediaSrc: ['*'], childSrc: ['*'], diff --git a/lib/response.js b/lib/response.js index 9f1740c8..4f572e47 100644 --- a/lib/response.js +++ b/lib/response.js @@ -591,7 +591,7 @@ function gitlabActionProjects (req, res, note) { ret.accesstoken = user.accessToken ret.profileid = user.profileid request( - config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?access_token=' + user.accessToken, + config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?membership=yes&per_page=100&access_token=' + user.accessToken, function (error, httpResponse, body) { if (!error && httpResponse.statusCode === 200) { ret.projects = JSON.parse(body) |