mirror of
https://github.com/fosrl/badger.git
synced 2026-02-08 05:56:46 +00:00
add more loggin
This commit is contained in:
4
main.go
4
main.go
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user