Andrey Tretyakov

Results 72 comments of Andrey Tretyakov

Well, one could argue the bug is mostly harmless, but then there's a counter argument that having your template more correct is not going to harm anyone either. I can...

This code still generates a compiler warning because it refers to modules that may not be available. The warning is present in the current version of PromEx too btw, so...

I'm using my fork already at least until this project starts accepting PRs again. But yeah, declaring code conditionally should fix it.

Cachex.get returning `{:ok, nil}` for missing values should be also fixed, as it makes it impossible to store valid nil values.

For example, you can return `:not_found` - not `{:ok, :not_found}`, but literally `:not_found` If the code can return errors, it could return `{:error, :not_found}`

>but that then just means it's not possible to store ':not_found'. It is possible, because the value in my suggestion is separated from the wrapper: `:not_found` -> missing record `{:ok,...

>Would you rather raise an exception if the key is missing? As far as I see there's no reason to do that. Absence of cached value is not an exceptional...

A low hanging fruit would be to add security header check first, so that in the absence of the header the proxy would return 404 (same as with invalid host)....

>Such a HTTP header check is already possible to do in the application itself We want to pretend the host is not served by the server, unless it's a Cloudflare...

I don't think "imitating" proxy responses is a good idea at all. You would have to make both the content and the headers match, which would be very fragile and...