PHPackages                             wearerequired/rest-api-same-origin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. wearerequired/rest-api-same-origin

ActiveWordpress-plugin[Security](/categories/security)

wearerequired/rest-api-same-origin
==================================

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

0.1.0(7y ago)13.5k1GPL-2.0-or-laterPHPPHP &gt;=7.1

Since May 18Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/wearerequired/rest-api-same-origin)[ Packagist](https://packagist.org/packages/wearerequired/rest-api-same-origin)[ Docs](https://github.com/wearerequired/rest-api-same-origin)[ RSS](/packages/wearerequired-rest-api-same-origin/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

REST API Strict Origin
======================

[](#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
------------

[](#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:

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance54

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2604d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1446895?v=4)[required](/maintainers/wearerequired)[@wearerequired](https://github.com/wearerequired)

---

Top Contributors

[![ocean90](https://avatars.githubusercontent.com/u/617637?v=4)](https://github.com/ocean90 "ocean90 (7 commits)")

---

Tags

corsrest-apisecuritywordpress-pluginwordpresscorsREST APIorigin

### Embed Badge

![Health badge](/badges/wearerequired-rest-api-same-origin/health.svg)

```
[![Health](https://phpackages.com/badges/wearerequired-rest-api-same-origin/health.svg)](https://phpackages.com/packages/wearerequired-rest-api-same-origin)
```

###  Alternatives

[mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

893.5M2](/packages/mikemclin-laravel-wp-password)[brain/nonces

OOP package for WordPress to deal with nonces.

25237.0k1](/packages/brain-nonces)[wp-privacy/wp-api-privacy

Strips potentially identifying information from outbound requests to the WordPress.org API

1632.6k](/packages/wp-privacy-wp-api-privacy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
