Commit bac39211 authored by rhtenhove's avatar rhtenhove Committed by Ruben ten Hove
Browse files

Add https_proxy support to gitlab oauth

Signed-off-by: default avatarRuben ten Hove <>
parent c9df47da
......@@ -6,16 +6,24 @@ const GitlabStrategy = require('passport-gitlab2').Strategy
const config = require('../../../config')
const response = require('../../../response')
const { setReturnToFromReferer, passportGeneralCallback } = require('../utils')
const HttpsProxyAgent = require('https-proxy-agent');
const gitlabAuth = module.exports = Router()
passport.use(new GitlabStrategy({
let gitlabAuthStrategy = new GitlabStrategy({
baseURL: config.gitlab.baseURL,
clientID: config.gitlab.clientID,
clientSecret: config.gitlab.clientSecret,
scope: config.gitlab.scope,
callbackURL: config.serverURL + '/auth/gitlab/callback'
}, passportGeneralCallback))
}, passportGeneralCallback)
if (process.env['https_proxy']) {
let httpsProxyAgent = new HttpsProxyAgent(process.env['https_proxy']);
gitlabAuth.get('/auth/gitlab', function (req, res, next) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment