add more loggin

This commit is contained in:
Milo Schwartz 2024-11-24 13:35:06 -05:00
parent 480730ba38
commit ca2fbf4f9c
No known key found for this signature in database

View file

@ -60,6 +60,8 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
}
func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
fmt.Println("config values are: ", p.apiBaseUrl, p.resourceSessionCookieName, p.sessionQueryParameter, p.userSessionCookieName)
sess := req.URL.Query().Get(p.sessionQueryParameter)
if sess != "" {
http.SetCookie(rw, &http.Cookie{
@ -85,6 +87,8 @@ func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
verifyURL := fmt.Sprintf("%s/badger/verify-session", p.apiBaseUrl)
fmt.Println("verify url is", verifyURL)
originalRequestURL := fmt.Sprintf("%s://%s%s", p.getScheme(req), req.Host, req.URL.RequestURI())
cookieData := VerifyBody{