metrico / qryn

Polyglot Observability Stack. Lightweight & Drop-in compatible with Loki, Prometheus, Tempo, Pyroscope, Opentelemetry, Datadog & more! WASM powered ⭐️ Star to Support
https://qryn.dev
GNU Affero General Public License v3.0
1.05k stars 63 forks source link

Changing authentication header prefix #506

Open voicenter opened 1 month ago

voicenter commented 1 month ago

For client who send token or any other authentication type we need to replace the prefix , We are patch the code before the basic auth plugin with that code : `

fastify.addHook('onRequest', (request, reply, done) => { this.authorizationPrefix = 'Token'         if(request.headers['Authorization'] && this.authorizationPrefix) {                  request.headers['Authorization'] = request.headers['Authorization'].replace(this.authorizationPrefix, '')         }          done();

    }) `

akvlad commented 1 month ago

Hello @voicenter . If you have patched the code, can you make a PR with the patch please?

akvlad commented 1 month ago

@voicenter can you please describe the use case for the patch. I don't understand how to make the same functionality for the bun release.

lmangani commented 3 weeks ago

@voicenter ping 👋