Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Doubts about many cookies and many Path for a single domain. #53

@frederikhors

Description

@frederikhors

Issue opened for the creation of a wiki page that summarizes the doubts and problems for newbies (#52).

Writing #52 I had a doubt:

I need to use surfing.SetBaseCookie(http.Cookie{Path: "/"})?

I don't know if many csrf cookies makes sense if I have these routes:

  • "/"
  • "/login" - server rendered html form with csrf
  • "/logout" - just get which logouts
  • "/api" - json api endpoint POST, GET, so it needs CSRF protection
  • "/oldApiEndpoint"

Why nosurf keep creating cookies for these routes? I think I just need one cookie on the Path: "/" and Domain: ".mysite.com".

Where am I wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions