fix: not using cookies anymore
I think Tauri doesn't like it very much
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"screenmark/screenmark/.gen/haystack/haystack/model"
|
||||
"screenmark/screenmark/agents/client"
|
||||
"screenmark/screenmark/models"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
@@ -311,28 +310,10 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
accessCookie := http.Cookie{
|
||||
Name: "access",
|
||||
Value: access,
|
||||
Expires: time.Now().Add(1 * time.Hour),
|
||||
Secure: false,
|
||||
HttpOnly: true,
|
||||
}
|
||||
|
||||
refreshCookie := http.Cookie{
|
||||
Name: "refresh",
|
||||
Value: access,
|
||||
Expires: time.Now().Add(24 * 30 * time.Hour),
|
||||
Secure: false,
|
||||
HttpOnly: true,
|
||||
Path: "/refresh",
|
||||
}
|
||||
|
||||
http.SetCookie(w, &accessCookie) // TODO
|
||||
http.SetCookie(w, &refreshCookie) // TODO
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
|
||||
fmt.Fprint(w, string(json))
|
||||
})
|
||||
|
||||
log.Println("Listening and serving on port 3040.")
|
||||
|
||||
Reference in New Issue
Block a user