2015-02-07 23:32:34 +05:30
|
|
|
location /minecraft.php {
|
|
|
|
if ($arg_name = "") {
|
|
|
|
return 400;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($arg_type = "cloack") {
|
|
|
|
rewrite .* http://skins.minecraft.net/MinecraftCloaks/$arg_name.png? permanent;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($arg_type = "skin") {
|
|
|
|
rewrite .* /skins/$arg_name last;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 404;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /cloaks/ {
|
2016-03-29 02:26:34 +05:30
|
|
|
try_files $uri $uri.png @cloaks;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @cloaks {
|
|
|
|
rewrite ^/cloaks/(.+?)(\.[^.]*$|$)$ http://skins.minecraft.net/MinecraftCloaks/$1.png? permanent;
|
2015-02-07 23:32:34 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
location ~* ^/skins/$ {
|
|
|
|
if ($arg_name = "") {
|
|
|
|
return 400;
|
|
|
|
}
|
|
|
|
|
|
|
|
rewrite .* /skins/$arg_name permanent;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* ^/cloaks/$ {
|
|
|
|
if ($arg_name = "") {
|
|
|
|
return 400;
|
|
|
|
}
|
|
|
|
|
|
|
|
rewrite .* /cloaks/$arg_name permanent;
|
2016-03-29 02:26:34 +05:30
|
|
|
}
|