Updated server-side self-refrencing links to only use port when not reverse proxied.
This commit is contained in:
parent
af982f8611
commit
46a7e9e067
|
|
@ -2,6 +2,7 @@
|
|||
"instanceName": "Canopy",
|
||||
"verbose": false,
|
||||
"port": 8080,
|
||||
"proxied": false,
|
||||
"protocol": "http",
|
||||
"domain": "localhost",
|
||||
"sessionSecret": "CHANGE_ME",
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ emailChangeSchema.methods.consume = async function(){
|
|||
|
||||
emailChangeSchema.methods.getChangeURL = function(){
|
||||
//Check for default port based on protocol
|
||||
if((config.protocol == 'http' && config.port == 80) || (config.protocol == 'https' && config.port == 443)){
|
||||
if((config.protocol == 'http' && config.port == 80) || (config.protocol == 'https' && config.port == 443 || config.proxied)){
|
||||
//Return path
|
||||
return `${config.protocol}://${config.domain}/emailChange?token=${this.token}`;
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ passwordResetSchema.methods.consume = async function(pass, confirmPass){
|
|||
|
||||
passwordResetSchema.methods.getResetURL = function(){
|
||||
//Check for default port based on protocol
|
||||
if((config.protocol == 'http' && config.port == 80) || (config.protocol == 'https' && config.port == 443)){
|
||||
if((config.protocol == 'http' && config.port == 80) || (config.protocol == 'https' && config.port == 443) || config.proxied){
|
||||
//Return path
|
||||
return `${config.protocol}://${config.domain}/passwordReset?token=${this.token}`;
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Reference in a new issue