Skip to content

Commit

Permalink
fix(authn): subfolder api is considered as a wrong origin(closes #6294
Browse files Browse the repository at this point in the history
…in #6301)
  • Loading branch information
itsHenry35 committed Apr 3, 2024
1 parent 58c3cb3 commit 1756036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/authn/authn.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package authn

import (
"fmt"
"net/http"
"net/url"

Expand All @@ -19,7 +20,7 @@ func NewAuthnInstance(r *http.Request) (*webauthn.WebAuthn, error) {
RPDisplayName: setting.GetStr(conf.SiteTitle),
RPID: siteUrl.Hostname(),
//RPOrigin: siteUrl.String(),
RPOrigins: []string{siteUrl.String()},
RPOrigins: []string{fmt.Sprintf("%s://%s", siteUrl.Scheme, siteUrl.Host)},
// RPOrigin: "http://localhost:5173"
})
}

0 comments on commit 1756036

Please sign in to comment.