jnessier / ReverseProxy-PlausibleAnalytics

Reverse proxy for Plausible Analytics, written in PHP for Shared Hostings on Apache.
MIT License
30 stars 6 forks source link

Improve IN/OUT headers support #7

Closed julienmru closed 1 year ago

julienmru commented 1 year ago

Hello !

Headers are not case sensitive, so I updated the code not to transmit Host, Accept-Encoding, X-Forwarded-For, Client-IP no matter the case.

I added support to pass original selected headers back to the client, for improved security and performance (eg. to allow the client to cache the JS files). As a consequence, I remove the hard-coded Access-Control-Allow-Origin / Access-Control-Allow-Credentials because they are sent by origin.

Of course, this is open to discussion.

Thanks.