Skip to content

Commit

Permalink
Merge pull request auth0-extensions#58 from zxan1285/public-url-fix
Browse files Browse the repository at this point in the history
`PUBLIC_WT_URL` fix for stage2
  • Loading branch information
zxan1285 authored Apr 19, 2019
2 parents 86acf79 + 4c439ff commit 6634715
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth0-account-link-extension",
"version": "2.3.3",
"version": "2.3.4",
"description": "Auth0 Account Link Extension",
"main": "index.js",
"engines": {
Expand Down
8 changes: 6 additions & 2 deletions webtask.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ const config = require('./lib/config');
const createServer = tools.createServer((wtConfig, wtStorage) => {
logger.info('Starting Account Link Extension - Version:', process.env.CLIENT_VERSION);
logger.info(' > WT_URL:', wtConfig('WT_URL'));
logger.info(' > PUBLIC_WT_URL:', config('PUBLIC_WT_URL'));
logger.info(' > PUBLIC_WT_URL:', wtConfig('PUBLIC_WT_URL'));
return hapiApp(wtConfig, wtStorage);
});

module.exports = (context, req, res) => {
config.setValue('PUBLIC_WT_URL', tools.urlHelpers.getWebtaskUrl(req));
const publicUrl = (req.x_wt && req.x_wt.ectx && req.x_wt.ectx.PUBLIC_WT_URL) || false;
if (!publicUrl) {
config.setValue('PUBLIC_WT_URL', tools.urlHelpers.getWebtaskUrl(req));
}

createServer(context, req, res);
};
2 changes: 1 addition & 1 deletion webtask.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Auth0 Account Link",
"name": "auth0-account-link",
"version": "2.3.3",
"version": "2.3.4",
"preVersion": "2.1.1",
"author": "auth0",
"description":
Expand Down

0 comments on commit 6634715

Please sign in to comment.