The common solution to handling CORS requests is as follow:
location ... { add_header Access-Control-Allow-Origin ...; add_header Access-Contr