awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
barryvdh avatar

barryvdh/laravel-corsArchived

0
View on GitHub↗
6,240 stars·607 forks·PHP·MIT·4 views

Laravel Cors

laravel-cors is a middleware package for Laravel applications that manages Cross-Origin Resource Sharing. It functions as an HTTP security layer that validates request origins and injects the necessary headers into application responses to control how external domains access a backend API.

The project provides a configuration-driven policy engine to match incoming request origins and methods against allowed values. This includes support for wildcard origin matching to authorize multiple trusted domains through a single rule and the automatic handling of pre-flight OPTIONS requests.

The system integrates into the request-response pipeline to provide global API access control and browser security configuration. It manages the injection of security headers to resolve cross-origin browser errors and ensure secure communication between a Laravel server and frontends hosted on different domains.

Features

  • Cross-Origin Resource Sharing - Manages CORS headers to allow or restrict requests from external domains for backend API security.
  • CORS Header Injection - Automatically appends necessary CORS headers to HTTP responses to allow cross-origin access.
  • API Access Control - Provides granular control over which external websites and services are permitted to access the backend API.
  • Cross-Origin Resource Sharing (CORS) Policies - Implements mechanisms to restrict or allow web requests from different origins using CORS headers.
  • Cross-Origin Security Policies - Configures origin validation and pre-flight request handling to prevent unauthorized cross-site access.
  • Cross-Domain Request Handling - Handles HTTP OPTIONS pre-flight requests to authorize subsequent cross-origin API calls.
  • Laravel Integrations - Provides a dedicated middleware package for integrating CORS header management within the Laravel framework.
  • Origin Pattern Matching - Supports wildcard origin matching to authorize multiple trusted domains through a single configuration rule.
  • HTTP Request Filtering - Acts as a security layer that filters incoming requests by validating origins and handling OPTIONS requests.
  • Policy Evaluation Engines - Implements a configuration-driven engine to match request origins and methods against allowed values.
  • Cross-Domain Frontend Integration - Enables frontends hosted on different domains to communicate securely with the Laravel server.
  • Request Pipelines - Integrates into the Laravel request-response pipeline to apply security headers globally across all routes.
  • API Development - Enables Cross-Origin Resource Sharing.

Star history

Star history chart for barryvdh/laravel-corsStar history chart for barryvdh/laravel-cors

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Laravel Cors

Similar open-source projects, ranked by how many features they share with Laravel Cors.
  • fruitcake/laravel-corsfruitcake avatar

    fruitcake/laravel-cors

    6,240View on GitHub↗

    This project is a CORS header manager and security plugin for Laravel. It functions as middleware that adds Cross-Origin Resource Sharing headers to HTTP responses to control how external domains access a Laravel backend. The software manages cross-origin request policies by defining allowed origins, methods, and headers. It handles pre-flight requests and allows for the restriction of sharing policies based on specific routes. The package provides API access control and cross-domain resource sharing by integrating custom header logic into the Laravel request lifecycle.

    PHPcorshacktoberfestlaravel
    View on GitHub↗6,240
  • expressjs/corsexpressjs avatar

    expressjs/cors

    6,194View on GitHub↗

    This is a Node.js middleware for Express and Node.js servers that manages Cross-Origin Resource Sharing policies. It functions as a policy manager and origin validator to define which origins, HTTP methods, and headers are permitted to access server resources. The project provides mechanisms for dynamic origin validation, allowing request origins to be checked against custom logic or databases. It also acts as an HTTP preflight request handler to process OPTIONS requests and verify server permissions before complex cross-site interactions occur. Its capability surface covers the management o

    JavaScriptcorsexpressjsjavascript
    View on GitHub↗6,194
  • ottoyiu/django-cors-headersottoyiu avatar

    ottoyiu/django-cors-headers

    5,587View on GitHub↗

    django-cors-headers is a Django application utility for managing cross-origin resource sharing. It adds HTTP headers to responses so web browsers can permit cross-origin requests from specified external domains. The project provides tools for defining which external domains, HTTP methods, and headers are permitted to access an API. It supports restricting allowed origins through static lists and regular expressions, and it enables the transmission of cookies and authentication credentials for cross-site session handling. Additional capabilities include API access control to limit cross-origi

    Python
    View on GitHub↗5,587
  • adamchainz/django-cors-headersadamchainz avatar

    adamchainz/django-cors-headers

    5,587View on GitHub↗

    django-cors-headers is a middleware for Django that manages Cross-Origin Resource Sharing headers to control which external domains can access server resources. It serves as a security component for enforcing access control policies through origin validation and header management. The project provides capabilities for origin whitelisting using hostnames or regular expressions and supports the Local Network Access specification to permit requests from private networks. It allows for granular control via path-based restrictions and dynamic origin validation driven by a signal system. The softw

    Python
    View on GitHub↗5,587
See all 30 alternatives to Laravel Cors→

Frequently asked questions

What does barryvdh/laravel-cors do?

laravel-cors is a middleware package for Laravel applications that manages Cross-Origin Resource Sharing. It functions as an HTTP security layer that validates request origins and injects the necessary headers into application responses to control how external domains access a backend API.

What are the main features of barryvdh/laravel-cors?

The main features of barryvdh/laravel-cors are: Cross-Origin Resource Sharing, CORS Header Injection, API Access Control, Cross-Origin Resource Sharing (CORS) Policies, Cross-Origin Security Policies, Cross-Domain Request Handling, Laravel Integrations, Origin Pattern Matching.

What are some open-source alternatives to barryvdh/laravel-cors?

Open-source alternatives to barryvdh/laravel-cors include: fruitcake/laravel-cors — This project is a CORS header manager and security plugin for Laravel. It functions as middleware that adds… expressjs/cors — This is a Node.js middleware for Express and Node.js servers that manages Cross-Origin Resource Sharing policies. It… ottoyiu/django-cors-headers — django-cors-headers is a Django application utility for managing cross-origin resource sharing. It adds HTTP headers… adamchainz/django-cors-headers — django-cors-headers is a middleware for Django that manages Cross-Origin Resource Sharing headers to control which… developit/express-es6-rest-api — Express es6 rest api is a starter template for building RESTful backend applications using modern JavaScript syntax… hacdias/webdav — This project is a self-hosted WebDAV file server and HTTP file manager that exposes a local file system for remote…