Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wearerequired/rest-api-same-origin

WordPress plugin to limit the Access-Control-Allow-Origin header to only allowed origins.
https://github.com/wearerequired/rest-api-same-origin

cors rest-api security wordpress-plugin

Last synced: about 2 months ago
JSON representation

WordPress plugin to limit the Access-Control-Allow-Origin header to only allowed origins.

Awesome Lists containing this project

README

        

# REST API Strict Origin

Limits `Access-Control-Allow-Origin` for REST API access to only allowed origins by [`is_allowed_http_origin()`](https://developer.wordpress.org/reference/functions/is_allowed_http_origin/). By default this includes the home and site URLs.

## Installation

If you're using [Composer](https://getcomposer.org/) to manage dependencies, you can use the following command to add the plugin to your site:

```bash
composer require wearerequired/rest-api-same-origin
```