+1
-1
@@ -25,7 +25,7 @@ interface userWindow extends GlobalWindow {
|
|||||||
declare var window: userWindow;
|
declare var window: userWindow;
|
||||||
|
|
||||||
// const basePath = window.location.pathname.replace("/password/reset", "");
|
// const basePath = window.location.pathname.replace("/password/reset", "");
|
||||||
const basePath = window.pages.MyAccount;
|
const basePath = window.pages.Base + window.pages.MyAccount;
|
||||||
|
|
||||||
const theme = new ThemeManager(document.getElementById("button-theme"));
|
const theme = new ThemeManager(document.getElementById("button-theme"));
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
lm "github.com/hrfee/jfa-go/logmessages"
|
lm "github.com/hrfee/jfa-go/logmessages"
|
||||||
@@ -68,9 +67,9 @@ func (app *appContext) getUserTokenLogin(gc *gin.Context) {
|
|||||||
host := app.ExternalDomainNoPort(gc)
|
host := app.ExternalDomainNoPort(gc)
|
||||||
uri := "/my"
|
uri := "/my"
|
||||||
// FIXME: This seems like a bad idea? I think it's to deal with people having Reverse proxy subfolder/URL base set to /accounts.
|
// FIXME: This seems like a bad idea? I think it's to deal with people having Reverse proxy subfolder/URL base set to /accounts.
|
||||||
if strings.HasPrefix(gc.Request.RequestURI, PAGES.Base) {
|
// if strings.HasPrefix(gc.Request.RequestURI, PAGES.Base) {
|
||||||
uri = "/accounts/my"
|
// uri = "/accounts/my"
|
||||||
}
|
// }
|
||||||
gc.SetCookie("user-refresh", refresh, REFRESH_TOKEN_VALIDITY_SEC, uri, host, true, true)
|
gc.SetCookie("user-refresh", refresh, REFRESH_TOKEN_VALIDITY_SEC, uri, host, true, true)
|
||||||
gc.JSON(200, getTokenDTO{token})
|
gc.JSON(200, getTokenDTO{token})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user