mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-20 18:07:59 +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, ",")
|
||||
if len(ips) == 0 {
|
||||
if len(ips) == 0 || ips[0] == "" {
|
||||
return remoteAddrWithoutPort()
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,8 @@ async function handleLoginAttempt() {
|
||||
|
||||
state.isLoading = false;
|
||||
if (response.status === 200) {
|
||||
setTimeout(() => { window.location.href = pageData.baseURL + "/"; }, 300);
|
||||
|
||||
container.animate({
|
||||
keyframes: [{ offset: 1, transform: "scale(0.95)", opacity: 0 }],
|
||||
options: { duration: 300, easing: "ease", fill: "forwards" }}
|
||||
@ -103,8 +105,6 @@ async function handleLoginAttempt() {
|
||||
keyframes: [{ offset: 1, opacity: 0 }],
|
||||
options: { duration: 300, easing: "ease", fill: "forwards", delay: 50 }
|
||||
});
|
||||
|
||||
setTimeout(() => { window.location.href = pageData.baseURL + "/"; }, 300);
|
||||
} else if (response.status === 401) {
|
||||
errorMessage.text(lang.incorrectCredentials);
|
||||
passwordInput.focus();
|
||||
|
Loading…
x
Reference in New Issue
Block a user