nginx config

What is CORS

Cross-Origin resource sharing(CORS) is a mechanism to allow resources on webpage to be requested from another domain outside the origin domain over the HTTP headers which provide browsers and servers a way to request URLS.


if you got problem sending request from ajax POST,GET .. etc in example when you work with two different domain or in real production too
you should use this configuration from your nginx settings

here the example to enable cors on nginx config, put this on your nginx block config,