Skip to content

Commit 4f7f143

Browse files
#955 Fix login pathing for external proxies (#956)
* #955 Fix login pathing for external proxies * chore: bump version to 4.3.28-20260505 [version bump] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 61fe0d4 commit 4f7f143

6 files changed

Lines changed: 88 additions & 89 deletions

File tree

configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "configure",
3-
"version": "4.3.27-20260428",
3+
"version": "4.3.28-20260505",
44
"homepage": "./configure/build",
55
"private": true,
66
"dependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmgis",
3-
"version": "4.3.27-20260428",
3+
"version": "4.3.28-20260505",
44
"description": "A web-based mapping and localization solution for science operation on planetary missions.",
55
"homepage": "build",
66
"repository": {

scripts/server.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ function ensureAdmin(
350350
res.render("adminlogin", {
351351
user: req.user,
352352
VERSION: configurePackageJson.version,
353-
ROOT_PATH: isDevEnv ? "" : process.env.ROOT_PATH || "",
353+
ROOT_PATH: isDevEnv ? "" : (process.env.ROOT_PATH ? process.env.ROOT_PATH + "/" : ""),
354354
});
355355
return;
356356
}
@@ -473,7 +473,7 @@ function ensureUser() {
473473
CLEARANCE_NUMBER: process.env.CLEARANCE_NUMBER || "CL##-####",
474474
CONTACT_INFO: process.env.CONTACT_INFO || "None Provided",
475475
AUTH_LOCAL_ALLOW_SIGNUP: process.env.AUTH_LOCAL_ALLOW_SIGNUP || false,
476-
ROOT_PATH: isDevEnv ? "" : process.env.ROOT_PATH || "",
476+
ROOT_PATH: isDevEnv ? "" : (process.env.ROOT_PATH ? process.env.ROOT_PATH + "/" : ""),
477477
});
478478
}
479479
}
@@ -706,8 +706,7 @@ setups.getBackendSetups(function (setups) {
706706
ROOT_PATH:
707707
process.env.NODE_ENV === "development"
708708
? ""
709-
: /*(process.env.EXTERNAL_ROOT_PATH || "") +*/
710-
process.env.ROOT_PATH || "",
709+
: (process.env.ROOT_PATH ? process.env.ROOT_PATH + "/" : ""),
711710
CLEARANCE_NUMBER: process.env.CLEARANCE_NUMBER || "CL##-####",
712711
CONTACT_INFO: process.env.CONTACT_INFO || "None Provided",
713712
});

views/adminlogin.pug

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
doctype html
2-
head
3-
title MMGIS / Configure
4-
link(rel='shortcut icon' href=ROOT_PATH + '/public/images/logos/logo.png')
5-
link(type='text/css' rel='stylesheet' href=ROOT_PATH + '/public/adminlogin.css')
6-
link(type='text/css' rel='stylesheet' href=ROOT_PATH + '/public/fonts/materialdesignicons/css/materialdesignicons.min.css')
7-
script(type='text/javascript' src=ROOT_PATH + '/public/jquery.min.js')
8-
script(type='text/javascript' src=ROOT_PATH + '/public/adminlogin.js')
9-
style.
10-
body { background-color: #1a1a1a; background-image: url(#{ROOT_PATH}/public/images/contours.png); }
11-
body.mmgisScrollbar
12-
#backIcon.mdi.mdi-keyboard-backspace.mdi-18px
13-
#setup
14-
| SETUP
15-
.container
16-
img(src=ROOT_PATH + '/public/images/logos/mmgis.png' alt='MMGIS' onClick='back()')
17-
span#msg.error
18-
form.box(name='form1')
19-
h4
20-
| Admin
21-
span Dashboard
22-
h5 Sign in to your account.
23-
input#username(type='text' name='username' placeholder='Username' autocomplete='off')
24-
input#pwd(type='password' name='password' placeholder='Password' autocomplete='off')
25-
input#pwd_retype(type='password' name='password' placeholder='Retype Password' autocomplete='off')
26-
div.btn1(onClick='login()') Sign in
1+
doctype html
2+
head
3+
title MMGIS / Configure
4+
link(rel='shortcut icon' href=ROOT_PATH + 'public/images/logos/logo.png')
5+
link(type='text/css' rel='stylesheet' href=ROOT_PATH + 'public/adminlogin.css')
6+
link(type='text/css' rel='stylesheet' href=ROOT_PATH + 'public/fonts/materialdesignicons/css/materialdesignicons.min.css')
7+
script(type='text/javascript' src=ROOT_PATH + 'public/jquery.min.js')
8+
script(type='text/javascript' src=ROOT_PATH + 'public/adminlogin.js')
9+
style.
10+
body { background-color: #1a1a1a; background-image: url(#{ROOT_PATH}public/images/contours.png); }
11+
body.mmgisScrollbar
12+
#backIcon.mdi.mdi-keyboard-backspace.mdi-18px
13+
#setup
14+
| SETUP
15+
.container
16+
img(src=ROOT_PATH + 'public/images/logos/mmgis.png' alt='MMGIS' onClick='back()')
17+
span#msg.error
18+
form.box(name='form1')
19+
h4
20+
| Admin
21+
span Dashboard
22+
h5 Sign in to your account.
23+
input#username(type='text' name='username' placeholder='Username' autocomplete='off')
24+
input#pwd(type='password' name='password' placeholder='Password' autocomplete='off')
25+
input#pwd_retype(type='password' name='password' placeholder='Retype Password' autocomplete='off')
26+
div.btn1(onClick='login()') Sign in
2727
div.version v#{VERSION}

views/login.pug

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
doctype html
2-
html(lang='en')
3-
head
4-
title MMGIS / Login
5-
meta(name='viewport' content='width=device-width, initial-scale=1.0')
6-
link(rel='shortcut icon' href=ROOT_PATH + '/public/images/logos/logo.png')
7-
link(type='text/css' rel='stylesheet' href=ROOT_PATH + '/public/login.css')
8-
script.
9-
allowSignup = #{AUTH_LOCAL_ALLOW_SIGNUP}
10-
script(type='text/javascript' src=ROOT_PATH + '/public/jquery.min.js')
11-
script(type='text/javascript' src=ROOT_PATH + '/public/login.js')
12-
style.
13-
@font-face { font-family: "Source Sans Pro"; src: url(#{ROOT_PATH}/public/fonts/sourcesanspro/SourceSansPro-Regular.ttf); }
14-
body { background-image: url(#{ROOT_PATH}/public/images/contours.png) !important; }
15-
body.mmgisScrollbar
16-
.header
17-
img(src=ROOT_PATH + '/public/images/logos/local_login_brand.png' alt='Branding' style='left: 44px; transform: unset; height: 60px; opacity: 0.5;')
18-
#container(style='z-index: 1;')
19-
img(src=ROOT_PATH + '/public/images/logos/mmgis.png' alt='MMGIS')
20-
span#msg.error
21-
form.box(name='form1')
22-
h4
23-
| Log in
24-
span to your account.
25-
h5 If you do not have an account,<br>sign up or request one from your administrator.
26-
label#username_label(for="username" style="position: absolute; color: #a1a4ad; top: 203px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Username
27-
input#username(type='text' name='username' placeholder='Username' autocomplete='off')
28-
label#email_label(for="email" style="position: absolute; color: #a1a4ad; top: 270px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Email
29-
input#email(type='text' name='email' placeholder='Email' autocomplete='off')
30-
div#email_description An email is optional.
31-
label#pwd_label(for="pwd" style="position: absolute; color: #a1a4ad; top: 270px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Password
32-
input#pwd(type='password' name='password' placeholder='Password' autocomplete='off')
33-
div#pwd_description Must be at least 8 characters long and contain at least: 1 uppercase letter, 1 lowercase letter, 1 number and 1 symbol.
34-
label#pwd_retype_label(for="pwd_retype" style="position: absolute; color: #a1a4ad; top: 464px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 120px; text-align: center;") Retype Password
35-
input#pwd_retype(type='password' name='password' placeholder='Retype Password' autocomplete='off')
36-
div#login.btn1(onClick='login()' title='Log in to MMGIS!') Log In
37-
div#toggleWrapper
38-
div#toggle(onClick='toggle()') Or Sign Up
39-
.footer(style='position: absolute; bottom: 0; padding: 44px; box-sizing: border-box; width: 100%; color: #adadad; font-size: 14px; display: flex; justify-content: flex-end; text-align: end;')
40-
41-
div
42-
div Contact: #{CONTACT_INFO}
43-
div Clearance Number: #{CLEARANCE_NUMBER}
44-
div(style='display: flex;')
45-
a(href='http://www.jpl.nasa.gov/copyrights.cfm' style='margin-right: 10px;') PRIVACY
46-
a(href='http://www.jpl.nasa.gov/imagepolicy/') IMAGE POLICY
47-
footer
1+
doctype html
2+
html(lang='en')
3+
head
4+
title MMGIS / Login
5+
meta(name='viewport' content='width=device-width, initial-scale=1.0')
6+
link(rel='shortcut icon' href=ROOT_PATH + 'public/images/logos/logo.png')
7+
link(type='text/css' rel='stylesheet' href=ROOT_PATH + 'public/login.css')
8+
script.
9+
allowSignup = #{AUTH_LOCAL_ALLOW_SIGNUP}
10+
script(type='text/javascript' src=ROOT_PATH + 'public/jquery.min.js')
11+
script(type='text/javascript' src=ROOT_PATH + 'public/login.js')
12+
style.
13+
@font-face { font-family: "Source Sans Pro"; src: url(#{ROOT_PATH}public/fonts/sourcesanspro/SourceSansPro-Regular.ttf); }
14+
body { background-image: url(#{ROOT_PATH}public/images/contours.png) !important; }
15+
body.mmgisScrollbar
16+
.header
17+
img(src=ROOT_PATH + 'public/images/logos/local_login_brand.png' alt='Branding' style='left: 44px; transform: unset; height: 60px; opacity: 0.5;')
18+
#container(style='z-index: 1;')
19+
img(src=ROOT_PATH + 'public/images/logos/mmgis.png' alt='MMGIS')
20+
span#msg.error
21+
form.box(name='form1')
22+
h4
23+
| Log in
24+
span to your account.
25+
h5 If you do not have an account,<br>sign up or request one from your administrator.
26+
label#username_label(for="username" style="position: absolute; color: #a1a4ad; top: 203px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Username
27+
input#username(type='text' name='username' placeholder='Username' autocomplete='off')
28+
label#email_label(for="email" style="position: absolute; color: #a1a4ad; top: 270px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Email
29+
input#email(type='text' name='email' placeholder='Email' autocomplete='off')
30+
div#email_description An email is optional.
31+
label#pwd_label(for="pwd" style="position: absolute; color: #a1a4ad; top: 270px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 100px; text-align: center;") Password
32+
input#pwd(type='password' name='password' placeholder='Password' autocomplete='off')
33+
div#pwd_description Must be at least 8 characters long and contain at least: 1 uppercase letter, 1 lowercase letter, 1 number and 1 symbol.
34+
label#pwd_retype_label(for="pwd_retype" style="position: absolute; color: #a1a4ad; top: 464px; left: 50%; transform: translateX(-50%); background: #1c1c1c; border-radius: 10px; font-size: 14px; width: 120px; text-align: center;") Retype Password
35+
input#pwd_retype(type='password' name='password' placeholder='Retype Password' autocomplete='off')
36+
div#login.btn1(onClick='login()' title='Log in to MMGIS!') Log In
37+
div#toggleWrapper
38+
div#toggle(onClick='toggle()') Or Sign Up
39+
.footer(style='position: absolute; bottom: 0; padding: 44px; box-sizing: border-box; width: 100%; color: #adadad; font-size: 14px; display: flex; justify-content: flex-end; text-align: end;')
40+
41+
div
42+
div Contact: #{CONTACT_INFO}
43+
div Clearance Number: #{CLEARANCE_NUMBER}
44+
div(style='display: flex;')
45+
a(href='http://www.jpl.nasa.gov/copyrights.cfm' style='margin-right: 10px;') PRIVACY
46+
a(href='http://www.jpl.nasa.gov/imagepolicy/') IMAGE POLICY
47+
footer
4848
script(id="_fed_an_ua_tag" type="text/javascript" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=NASA&subagency=MMGIS&dclink=true&sp=search,s")

views/resetpassword.pug

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ doctype html
22
html(lang='en')
33
head
44
title MMGIS / Reset Password
5-
link(rel='shortcut icon' href=ROOT_PATH + '/public/images/logos/logo.png')
6-
link(type='text/css' rel='stylesheet' href=ROOT_PATH + '/public/resetPassword.css')
7-
script(type='text/javascript' src=ROOT_PATH + '/public/jquery.min.js')
8-
script(type='text/javascript' src=ROOT_PATH + '/public/resetPassword.js')
5+
link(rel='shortcut icon' href=ROOT_PATH + 'public/images/logos/logo.png')
6+
link(type='text/css' rel='stylesheet' href=ROOT_PATH + 'public/resetPassword.css')
7+
script(type='text/javascript' src=ROOT_PATH + 'public/jquery.min.js')
8+
script(type='text/javascript' src=ROOT_PATH + 'public/resetPassword.js')
99
style.
10-
@font-face { font-family: "Source Sans Pro"; src: url(#{ROOT_PATH}/public/fonts/sourcesanspro/SourceSansPro-Regular.ttf); }
11-
body { background-image: url(#{ROOT_PATH}/public/images/contours.png) !important; }
10+
@font-face { font-family: "Source Sans Pro"; src: url(#{ROOT_PATH}public/fonts/sourcesanspro/SourceSansPro-Regular.ttf); }
11+
body { background-image: url(#{ROOT_PATH}public/images/contours.png) !important; }
1212
body.mmgisScrollbar
1313
.header
14-
img(src=ROOT_PATH + '/public/images/logos/local_login_brand.png' alt='Branding' style='left: 44px; transform: unset; height: 60px; opacity: 0.5;')
14+
img(src=ROOT_PATH + 'public/images/logos/local_login_brand.png' alt='Branding' style='left: 44px; transform: unset; height: 60px; opacity: 0.5;')
1515
div#container
16-
img(src=ROOT_PATH + '/public/images/logos/mmgis.png' alt='MMGIS')
16+
img(src=ROOT_PATH + 'public/images/logos/mmgis.png' alt='MMGIS')
1717
span#msgError.error
1818
div#msgSuccess.success
1919
div 🗸
20-
div#msgSuccessMsg
20+
div#msgSuccessMsg
2121
div.btn1(onCLick='goHome()' style='top: 60%;') Return Home
2222
form.box(name='form1' title='Reset your MMGIS password.')
2323
h4(style='color: #eab708;')
@@ -32,7 +32,7 @@ html(lang='en')
3232
input#pwd_retype(type='password' name='password' placeholder='Retype Password' autocomplete='off')
3333
div.btn1(onClick='resetPassword()') Reset Password
3434
.footer(style='position: absolute; bottom: 0; padding: 44px; box-sizing: border-box; width: 100%; color: #adadad; font-size: 14px; display: flex; justify-content: flex-end; text-align: end;')
35-
35+
3636
div
3737
div Contact: #{CONTACT_INFO}
3838
div Clearance Number: #{CLEARANCE_NUMBER}

0 commit comments

Comments
 (0)