Skip to content

Enhancement: Improve docs hint that dev server proxy key is a RegExp, not a glob #3298

Open
@supermanHub

Description

@supermanHub

What problem does this feature solve?

Current Behavior

If developers specify some regex on dev server proxy, it does not work.

// vue.config.js
module.exports = {
  devServer: {
    proxy: {
      '/interaction/*/info':  .... // Path regex does not work!!!
    }
  }
}

Expected Behavior

Some basic path regex should be support, please refer to context matching

NOTE: I believe this feature should to have a very higher priority, could anybody please kindly to work on it? Thank you very much!

What does the proposed API look like?

At least to match * in path regex. for example,

if path regex equals to /interaction/*/info; then

  1. Dev server should to proxy /interaction/middle-path/info to backend server.

  2. And must not proxy /interaction/middle-path/anther-path/info to back-end server.

etc...,

please refer to context matching

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions