Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Merge requests
  • !1009

Add option to rewrite domain in set-cookie headers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/Volune/rewrite-cookie-domain into master May 18, 2016
  • Overview 17
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: Volune

Sometime the set-cookie header specify a domain for the cookie. When proxying the a target using changeOrigin option, the response may contain a cookie not matching the domain of the client.

Example of such a cookie: foo=bar; domain=my.domain; expires=Tue, 12-Feb-2019 10:50:41 GMT; path=/

This pull request adds an option to rewrite the set-cookie header of the response.

Possible option values:

  • disabled (default): cookieDomainRewrite: false

  • rewrite all domains: cookieDomainRewrite: "my.client.domain"

  • remove all domains: cookieDomainRewrite: ""

  • more advanced configuration (this example removes all except one):

    cookieDomainRewrite: {
      "*": "",
      "some.domain": "some.domain"
    }

Let me know if I can improve this option or for any question.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Volune/rewrite-cookie-domain