Skip to content

added support for regex in proxy options - #148

Closed
jamon wants to merge 2 commits into
webpack:masterfrom
jamon:master
Closed

jamon wants to merge 2 commits into
webpack:masterfrom
jamon:master

Conversation

@jamon

@jamon jamon commented Apr 5, 2015

Copy link
Copy Markdown

provide configurations where the path is a regular expression, eg:

        proxy: [
            {
                path: /\/google(.*)/,
                target: "http://www.google.com/"
            }
        ],

provide configurations where the path is a regular expression, eg:
        proxy: [
            {
                path: /\/google(.*)/,
                target: "http://www.google.com/"
            }
        ],
@jamon jamon changed the title added support for options.proxy as an array. This will allow you to added support for regex in proxy options Apr 5, 2015
Comment thread bin/webpack-dev-server.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part should be moved into lib/Server.js to allow this config style without the CLI too.

@AprilArcus

Copy link
Copy Markdown

This would be super useful for us! We are working on a mock server that has to support a very heterogenous legacy route scheme, and we'd like to be able to white-list certain routes and proxy the rest.

@sokra

sokra commented May 5, 2015

Copy link
Copy Markdown
Member

@AprilArcus take a look at the note, fix it and create another PR.

@ntharim

ntharim commented May 26, 2015

Copy link
Copy Markdown
Contributor

I fixed this in #187. Please a have look.

@PavelGavlik

Copy link
Copy Markdown

Shouldn't we close this PR when #187 has superseded this PR and it has been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants