Skip to content

Commit

Permalink
Merge pull request #147 from TAMULib/referrer-query-param-fix
Browse files Browse the repository at this point in the history
Referrer query param fix
  • Loading branch information
jcreel committed Oct 18, 2019
2 parents db2c8f1 + c2be85c commit 8bd1c7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/setup.js
Expand Up @@ -52,15 +52,15 @@ function setUpApp(bootstrapApp) {
sessionStorage.role = appConfig.anonymousRole;
connect({});
} else {
var referer = location.href;
var referrer = location.href;
if (location.href.indexOf('?') >= 0) {
var parts = location.href.split('?');
referer = parts[0] + encodeURIComponent(parts[1]);
referrer = parts[0] + '?' + encodeURIComponent(parts[1]);
}
if (appConfig.mockRole) {
referer += "&mock=" + appConfig.mockRole;
referrer += "&mock=" + appConfig.mockRole;
}
window.open(appConfig.authService + "/token?referer=" + referer, "_self");
window.open(appConfig.authService + "/token?referrer=" + referrer, "_self");
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "weaver-ui-core",
"private": false,
"version": "2.0.5",
"version": "2.0.6",
"description": "Weaver AngularJs Core Module",
"repository": " https://github.com/TAMULib/Weaver-UI-Core.git",
"license": "MIT",
Expand Down

0 comments on commit 8bd1c7a

Please sign in to comment.