Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name {{ imgproxy_host }};
- location / {
- expires 365d;
- set $width "0";
- set $height "0";
- set $type "auto";
- set $enlarge "1";
- set $extend "0";
- if ($arg_width) {
- set $width $arg_width;
- }
- if ($arg_height) {
- set $height $arg_height;
- }
- if ($arg_fit = "bounds") {
- set $type "fit";
- set $extend "1";
- }
- if ($arg_fit = "crop") {
- set $type "fill";
- set $extend "1";
- }
- set $args '';
- rewrite ^/(.*)$ /insecure/resize:$type:$width:$height:$enlarge:$extend/bg:255:255:255/plain/local:///$1 break;
- proxy_pass http://127.0.0.1:8001;
- proxy_redirect off;
- proxy_set_header Host $host;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment