Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proxy): add proxy action #12

Merged
merged 4 commits into from
Jul 16, 2019
Merged

feat(proxy): add proxy action #12

merged 4 commits into from
Jul 16, 2019

Conversation

xuchaoying
Copy link
Member

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

feature

  • What is the related issue? (Use #issue_id to relate an open issue)

  • Does this PR introduce a breaking change?

no

  • Other information:

@xuchaoying xuchaoying added the PR: new feature :rocket: New Feature label Jul 15, 2019
@xuchaoying xuchaoying requested a review from leeluolee July 15, 2019 12:46
@xuchaoying xuchaoying self-assigned this Jul 15, 2019
route(({ get }) => {
get('/api(.*)').to.proxy(PROXY_SERVER);
get('/origin/api/test').to.proxy(PROXY_SERVER, {
changeOrigin: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

changeOrigin 建议作为默认选择?

Copy link
Member Author

Choose a reason for hiding this comment

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

一般changeOrigin还是默认false的吧,它只对 name-based virtual site 有用

packages/svrx/lib/plugin/svrx-plugin-proxy/index.js Outdated Show resolved Hide resolved
@xuchaoying xuchaoying merged commit 0415382 into master Jul 16, 2019
@xuchaoying xuchaoying deleted the cy-route-proxy branch July 16, 2019 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: new feature :rocket: New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants