Enable CORS Support – Wordpress Plugin - Rating, Reviews, Demo & Download

Enable CORS Support – Preview Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

A cross-origin request is demonstrated by the front-end JavaScript code served from https://domain-a.com, which uses XMLHttpRequest to request https://domain-b.com/data.json.

Cross-origin HTTP requests initiated by scripts are restricted by browsers for security reasons. The same-origin policy, for example, is followed by XMLHttpRequest and the Fetch API. This means that a web application using those APIs can only request resources from the origin from which the application was loaded, unless the response from other origins includes the appropriate CORS headers.

In response, the server returns a Access-Control-Allow-Origin header with Access-Control-Allow-Origin: *, which means that the resource can be accessed by any origin.

`

Access-Control-Allow-Origin: *
`

This pattern of the Origin and Access-Control-Allow-Origin headers is the simplest use of the access control protocol. If the resource owners at https://bar.other wished to restrict access to the resource to requests only from https://foo.example (i.e., no domain other than https://foo.example can access the resource in a cross-origin manner), they would send:
Access-Control-Allow-Origin: https://foo.example

Screenshots

  1. A demonstration of how this plugin works

    A demonstration of how this plugin works


Reviews & Comments