WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Varnish as a Service
[resolved] purging not ban (2 posts)

  1. javaclinic
    Member
    Posted 1 year ago #

    Hi, i am using varnish 3 . and using with out admin .

    in your code i see that you are using PURGE request when admin is not specified.

    I think in V 3 there purge replaced with ban ..

    $out = "PURGE $wpv_url HTTP/1.0\r\n";
    $out .= "Host: $wpv_host\r\n";
    $out .= "Connection: Close\r\n\r\n";
    fwrite($varnish_sock, $out);

    shd we change code above from purge to ban ?

    Zee

    http://wordpress.org/extend/plugins/wordpress-varnish-as-a-service/

  2. Javier Casares
    Member
    Plugin Author

    Posted 1 year ago #

    BAN or PURGE is for Admin commands. The "method" you use via HTTP is configurable in your VCL. By default is always PURGE...

    if (req.request == "PURGE") {
        if (!client.ip ~ purge) {
          error 405 "Method Not Allowed";
        }
        return(pipe);
      }

    You can use the request method you prefer...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags