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
  • Issues
  • #845
Closed
Open
Issue created Jun 29, 2015 by Administrator@rootContributor

Add support of 303 to hostRewrite option

Created by: abanctelchevrel

My backend implements a POST to http://api.domain.com/resources with the following response :

  • Status Code : 303 See Other
  • Location header : http://api.domain.com/resources/resourceId

I use node-http-proxy (through grunt-proxy) to bypass SOP on my single page app (hosted on localhost:9000), but when I POST on /resources I keep having rejected request because of SOP, even using the hostRewrite option as follows :

httpProxy.createProxyServer({
                ...
                hostRewrite: 'localhost:9000'
              })

Digging into node-http-proxy code I found this test on response code in setRedirectHostRewrite precondition :

var redirectRegex = /^30(1|2|3|7|8)$/;

Why not add 303 to this condition ?

Assignee
Assign to
Time tracking