server { root /usr/share/nginx/html; # Any route that doesn't have a file extension (e.g. /devices) location / { try_files $uri $uri/ /index.html; add_header Access-Control-Allow-Origin "*"; } }