• Hi:

    When this plugin works, it’s great, ran into the latest issue where I see:

    Sanity check failed for source (passed as absolute path on nginx): Path is outside allowed path

    Few things about my setup:

    I do not have a standard wp-content directory and am using:

    location ~* ^/app/.*\.(png|jpe?g)$ {
        add_header Vary Accept;
        expires 365d;
    
        if ($http_accept ~* "webp"){
            set $whattodo A;
        }
        if (-f $request_filename.webp) {
            set $whattodo  "${whattodo}B";
        }
        if ($whattodo = AB) {
            rewrite ^(.*) $1.webp last;
        }
        if ($whattodo = A) {
            rewrite ^/app/.*\.(jpe?g|png)$ /app/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=app last;
        }
    }
    
    location ~* ^/app/.*\.webp$ {
        expires 365d;
        if ($whattodo = AB) {
            add_header Vary Accept;
        }
    }

    I see images without a problem when I am logged in. I get “Sanity check failed for source (passed as absolute path on nginx): Path is outside allowed path” when not logged in.

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter Mat Gargano

    (@matstars)

    You can allow multiple directories and use in_array against the filter. Where is the directory determined. I can issue a PR. Link me to the exact line in your github repo.

    Thread Starter Mat Gargano

    (@matstars)

    Hey! Welcome back. How is this looking

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Upgraded to Version 0.14.16 still getting Sanity check failed for source (passed’ is closed to new replies.