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

README: Corrected confusing example #98

Merged
merged 1 commit into from
Jul 22, 2020
Merged

Conversation

nahuel
Copy link
Contributor

@nahuel nahuel commented Jul 21, 2020

upstream is passed as base to fastify-reply-from. Quoting fastify-reply-form doc:

base
Set the base URL for all the forwarded requests. Will be required if http2 is set to true Note that path will be discarded.

So, specifying /auth in upstream has no effect at all, but this example seems to suggest /auth/user requests will be forwarded to http://single-signon.example.com/auth/user, when the real target will be http://single-signon.example.com/user.

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

`upstream` is passed as `base` to `fastify-reply-from`. Quoting `fastify-reply-form` doc:

> *base*
> Set the base URL for all the forwarded requests. Will be required if http2 is set to true Note that path will be discarded.

So, specifying `/auth` in `upstream` has no effect at all, but this example seems to suggest `/auth/user` requests will be forwarded to `http://single-signon.example.com/auth/user`, when the real target will be `http://single-signon.example.com/user`.
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina
Copy link
Member

good spot!

@mcollina mcollina merged commit 15ce3e7 into fastify:master Jul 22, 2020
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.

2 participants