Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/wearerequired/rest-api-same-origin
- Owner: wearerequired
- License: gpl-2.0
- Created: 2019-05-18T09:45:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T09:51:26.000Z (over 5 years ago)
- Last Synced: 2024-11-01T09:39:19.239Z (2 months ago)
- Topics: cors, rest-api, security, wordpress-plugin
- Language: PHP
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
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
```