login fix

This commit is contained in:
darius 2024-05-20 00:20:50 +02:00
parent 44cbf85403
commit 61871201d9
2 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,7 @@ func main() {
go http.ListenAndServe(":4000", cors.AllowAll().Handler(webMux))
c := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedOrigins: []string{"http://localhost:4000", "https://*.dariusklein.nl"},
AllowedMethods: []string{
http.MethodHead,
http.MethodGet,

View File

@ -13,6 +13,7 @@ func Page(title string, body g.Node) g.Node {
Title: title,
Language: "en",
Head: []g.Node{
Meta(Name("htmx-config"), Content("{\"withCredentials\":\"true\"}")),
Script(Src("https://cdn.tailwindcss.com?plugins=typography")),
Script(Src("https://unpkg.com/htmx.org")),
Link(Rel("icon"), Type("image/x-icon"), Href("assets/images/favicon.ico")),