From 534e6e1f0bbd444883395e2ace2f4418232e168b Mon Sep 17 00:00:00 2001 From: Dominik Michno Date: Fri, 3 May 2019 10:50:33 -0400 Subject: [PATCH] base url --- api/helpers/passport.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/helpers/passport.js b/api/helpers/passport.js index 68b377a..f6c28e4 100644 --- a/api/helpers/passport.js +++ b/api/helpers/passport.js @@ -48,7 +48,9 @@ function PassportHelper () { const protocol = strategies[key].protocol const callbackURL = strategies[key].callback let baseURL = '' - if (sails.config.custom.baseURL && sails.config.custom.baseURL !== null) { + if (process.env.BASE_URL) { + baseURL = process.env.BASE_URL + } else if (sails.config.custom.baseURL && sails.config.custom.baseURL !== null) { baseURL = sails.config.custom.baseURL } else { sails.log.warn('Please add \'appUrl\' to configuration')