Adaptive-Images icon indicating copy to clipboard operation
Adaptive-Images copied to clipboard

Breaks when running locally on localhost

Open brentonstrine opened this issue 9 years ago • 1 comments

I believe that because it uses $_SERVER['DOCUMENT_ROOT'] to get the document root, which is not the same as the web URL root, the output path for images is wrong and images break on localhost.

brentonstrine avatar Apr 22 '15 22:04 brentonstrine

Maybe try this? $whitelist = array( '127.0.0.1', '::1' );

if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){
    // set desired document root here
}

ableade avatar Jan 08 '16 17:01 ableade