= CORS (cross origin resource sharing) = === https://www.tutorialspoint.com/spring_boot/spring_boot_cors_support.htm === Cross-Origin Resource Sharing (CORS) is a security concept that allows restricting the resources implemented in web browsers. It prevents the JavaScript code producing or consuming the requests against different origin. === https://en.wikipedia.org/wiki/Cross-origin_resource_sharing === The CORS standard describes new HTTP headers which provide browsers a way to request remote URLs only when they have permission === https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Examples === Limiting the possible Access-Control-Allow-Origin values to a set of allowed origins requires code on the server side to check the value of the Origin request header, compare that to a list of allowed origins, and then if the Origin value is in the list, to set the Access-Control-Allow-Origin value to the same value as the Origin value == Headers == * https://en.wikipedia.org/wiki/Cross-origin_resource_sharing#Headers Response headers * Access-Control-Allow-Origin * Access-Control-Allow-Credential == PHP example == === read.example.org/index.php === {{{#!highlight php }}} === auth.example.org/index.php === {{{#!highlight php }}} === app.example.org/index.html === {{{#!highlight html
}}} === Apache vhosts configuration === {{{