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

can register proxy by host #206

Closed
2 tasks done
evlon opened this issue Dec 5, 2021 · 3 comments · Fixed by #332
Closed
2 tasks done

can register proxy by host #206

evlon opened this issue Dec 5, 2021 · 3 comments · Fixed by #332

Comments

@evlon
Copy link

evlon commented Dec 5, 2021

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

can register proxy by host name

Motivation

No response

Example

server.register(proxy, {
  upstream: 'http://single-signon.example.com',
  host: 'xxx.sample.com', // optional
  http2: false // optional
})

@mcollina
Copy link
Member

mcollina commented Dec 6, 2021

This would be a good feature to add!

Would you like to send a Pull Request to address this issue? Remember to add unit tests.

Check out https://www.fastify.io/docs/latest/Routes/#constraints, it's likely just about passing this to the routes.

@climba03003
Copy link
Member

I think it is already implemented in #182

constraints: opts.constraints || {},

The follow-up update should be documentation only

@EtienneK
Copy link

EtienneK commented Dec 8, 2023

I think it is already implemented in #182

constraints: opts.constraints || {},

The follow-up update should be documentation only

This works, but not for websockets. Websocket support currently ignores the host constraint.

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

Successfully merging a pull request may close this issue.

4 participants