Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sorry if I wasn’t clear.

    Currently the varnish configs generated by this plugin *is* caching “403 Forbidden” errors. Varnish should not cache “403 Forbidden” errors. In our case, we generate 403 responses for some clients behaviour using mod_evasive, mod_security, etc. These responses should *not* be cached, but they are using the varnish configs generated by this plugin.

    I’m requesting that we add logic to ensure that the “403 Forbidden” response never gets cached by Varnish.

    The code change I listed above would make it match the default behaviour as defined by the Varnish Book–with the exception that it will *not* cache 404. By default, Varnish *does* cache 404, but your configs appear to intentionally *not* cache 404. So the code I provided would prevent caching 404 as well.

    The code change I recommended would only cache the following responses:

    1. 200: OK
    2. 203: Non-Authoritative Information
    3. 300: Multiple Choices
    4. 301: Moved Permanently
    5. 302: Moved Temporarily
    6. 304: Not modified
    7. 307: Temporary Redirect
    8. 410: Gone

    Which I believe is the intended behaviour for most users.

    • This reply was modified 2 years, 1 month ago by maltfield.

    Wow, fixed in <24 hours. You’re amazing! Thank you!! <3

Viewing 2 replies - 1 through 2 (of 2 total)