Skip to content

Instantly share code, notes, and snippets.

@ajskelton
Last active January 30, 2019 18:50
Show Gist options
  • Save ajskelton/6eca1d026301a1690213a671c5e564bc to your computer and use it in GitHub Desktop.
Save ajskelton/6eca1d026301a1690213a671c5e564bc to your computer and use it in GitHub Desktop.
Laravel Valet Local then Remote Images
location ~* .(png|jpe?g|gif|ico|svg)$ {
expires 24h;
log_not_found off;
root '/Users/USERNAME/.valet/Sites/mixpanel/’;
if (-f $request_filename) {
break;
}
try_files $uri $uri/ @production;
}
location @production {
resolver 8.8.8.8;
proxy_pass https://example.com/$uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment