mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 02:18:22 +02:00
Update auth stuff
This commit is contained in:
parent
c9e6b774f3
commit
ce3a7ee29c
@ -380,7 +380,7 @@ func (a *application) addressOfRequest(r *http.Request) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ips := strings.Split(forwardedFor, ",")
|
ips := strings.Split(forwardedFor, ",")
|
||||||
if len(ips) == 0 {
|
if len(ips) == 0 || ips[0] == "" {
|
||||||
return remoteAddrWithoutPort()
|
return remoteAddrWithoutPort()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,6 +94,8 @@ async function handleLoginAttempt() {
|
|||||||
|
|
||||||
state.isLoading = false;
|
state.isLoading = false;
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
setTimeout(() => { window.location.href = pageData.baseURL + "/"; }, 300);
|
||||||
|
|
||||||
container.animate({
|
container.animate({
|
||||||
keyframes: [{ offset: 1, transform: "scale(0.95)", opacity: 0 }],
|
keyframes: [{ offset: 1, transform: "scale(0.95)", opacity: 0 }],
|
||||||
options: { duration: 300, easing: "ease", fill: "forwards" }}
|
options: { duration: 300, easing: "ease", fill: "forwards" }}
|
||||||
@ -103,8 +105,6 @@ async function handleLoginAttempt() {
|
|||||||
keyframes: [{ offset: 1, opacity: 0 }],
|
keyframes: [{ offset: 1, opacity: 0 }],
|
||||||
options: { duration: 300, easing: "ease", fill: "forwards", delay: 50 }
|
options: { duration: 300, easing: "ease", fill: "forwards", delay: 50 }
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => { window.location.href = pageData.baseURL + "/"; }, 300);
|
|
||||||
} else if (response.status === 401) {
|
} else if (response.status === 401) {
|
||||||
errorMessage.text(lang.incorrectCredentials);
|
errorMessage.text(lang.incorrectCredentials);
|
||||||
passwordInput.focus();
|
passwordInput.focus();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user