vesparny / fair-analytics

📊 An analytics server that doesn't undermine user's privacy
MIT License
748 stars 24 forks source link

Origin check for POST requests seems wrong #22

Open benwiley4000 opened 5 years ago

benwiley4000 commented 5 years ago

I noticed when setting up the origin configuration for the fair analytics server that the server side logic doesn't make much sense. It's not possible for the origin configuration to equal both the host and hostname at the same time, and it shouldn't equal either of those since the origin header actually needs to include the network protocol (http:// or https://).

I gave a go at fixing it in my fork and I could make a PR if you'd like: https://github.com/benwiley4000/fair-analytics/commit/15eb9b6d540c9dca9e931e744d4489262b4053ce