mirror of
https://github.com/fosrl/badger.git
synced 2025-05-13 05:40:39 +01:00
add more loggin
This commit is contained in:
parent
480730ba38
commit
ca2fbf4f9c
1 changed files with 4 additions and 0 deletions
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{
|
||||
|
|
Loading…
Reference in a new issue