location / {
add_header 'Access-Control-Allow-Origin' '*';
try_files $uri $uri/ @router
index index.html index.htm;
}
location @router {
rewrite ^.*$ /index.html last;
}
if (!-e $request_filename) {
rewrite ^/(.*) /index.html last;
break;
}