-
-
Save weapp/c1a88f6fe16dc2c14061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nginx must be compiled with http_image_filter_module | |
# On mac: | |
# | |
# - brew edit nginx | |
# - Add "--with-http_image_filter_module" to the args array around line 62 | |
# - Run 'brew install nginx --build-from-source' | |
daemon off; # For testing convenience | |
error_log /dev/stdout; | |
worker_processes 3; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
map $arg_style $width { | |
default -; | |
detail 332; | |
featured 264; | |
grid 126; | |
h10 10; | |
h80 56; | |
h83 59; | |
h124 87; | |
h150 105; | |
h180 126; | |
h200 140; | |
h210 147; | |
h300 210; | |
h314 220; | |
h370 260; | |
h320 224; | |
h420 294; | |
h555 389; | |
h580 406; | |
h850 595; | |
lg_grid 220; | |
medium 264; | |
panasonic_grid 177; | |
panasonic_detail 571; | |
portrait 742; | |
ps3_hd 153; | |
ps3_hd_detail 308; | |
ps3_full_hd 230; | |
ps3_full_hd_detail 462; | |
samsung_grid 82; | |
samsung_detail 287; | |
thumb 90; | |
web 640; | |
wiiu_hd 304; | |
wiiu_gamepad 192; | |
} | |
map $arg_style $height { | |
default -; | |
detail 448; | |
featured 400; | |
grid 180; | |
h10 10; | |
h80 80; | |
h83 83; | |
h124 124; | |
h150 150; | |
h180 180; | |
h200 200; | |
h210 210; | |
h300 300; | |
h314 314; | |
h370 370; | |
h320 320; | |
h420 420; | |
h555 555; | |
h580 580; | |
h850 850; | |
lg_grid 320; | |
medium 400; | |
panasonic_grid 251; | |
panasonic_detail 847; | |
portrait 1080; | |
ps3_hd 229; | |
ps3_hd_detail 449; | |
ps3_full_hd 344; | |
ps3_full_hd_detail 674; | |
samsung_grid 115; | |
samsung_detail 423; | |
thumb 130; | |
web 360; | |
wiiu_hd 454; | |
wiiu_gamepad 281; | |
} | |
server { | |
listen 9000; | |
server_name localhost; | |
root .; | |
access_log /dev/stdout; | |
location / { | |
proxy_pass http://d1ebny11bppum5.cloudfront.net; | |
image_filter resize $width $height; | |
image_filter_jpeg_quality 95; | |
allow all; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment