Conversation
Signed-off-by: pqnet <119850+pqnet@users.noreply.github.com>
Signed-off-by: pqnet <119850+pqnet@users.noreply.github.com>
Signed-off-by: pqnet <119850+pqnet@users.noreply.github.com>
Signed-off-by: pqnet <119850+pqnet@users.noreply.github.com>
|
fixes #168 |
There was a problem hiding this comment.
I think this, alongside #165, should be rewritten so that there is a simple boolean proxy option that, when enabled, supports the Proxy-Authorization header and sets the correct error response code.
This way we're enforcing adherence to specifications.
I agree. Initially I thought to align with the setting for the I can take care of implementing the changes + tests for this, though I'd need to clarify a couple things:
|
Thanks @pqnet, we'd just need to do a major release to switch to this @fastify/plugins wdyt? |
|
@Fdawgs I have updated this PR to implement the |
Signed-off-by: pqnet <119850+pqnet@users.noreply.github.com>
|
This is perfect, thanks @pqnet. Will take a proper look this evening. |
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new option, proxyMode, to enable HTTP proxy authentication instead of resource authentication. Key changes include:
- Adding proxyMode support in type definitions and tests.
- Updating the main plugin logic in index.js to adjust header names, status codes, and error handling when proxyMode is enabled.
- Enhancing the documentation in README.md to reflect the new proxyMode functionality.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| types/index.test-d.ts | Adds tests for the new proxyMode option |
| test/index.test.js | Implements tests validating proxy authentication logic |
| index.js | Updates authentication logic to support proxyMode |
| README.md | Updates documentation for proxyMode option |
Co-authored-by: KaKa <23028015+climba03003@users.noreply.github.com> Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
Checklist
npm run testandnpm run benchmarkand the Code of conduct