awesome-repositories.com
Blog
awesome-repositories.com

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

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
expressjs avatar

expressjs/cors

0
View on GitHub↗
6,194 stars·501 forks·JavaScript·MIT·2 views

Cors

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 of access control headers and the implementation of per-request policies. These policies can be computed on the fly based on specific request paths or runtime properties to determine access permissions.

Features

  • CORS Header Management - Manages cross-origin resource sharing by manipulating Access-Control-Allow-Origin and related HTTP response headers.
  • CORS Middleware - Provides middleware for Express and Node.js servers to manage Cross-Origin Resource Sharing headers and permissions.
  • CORS Header Injection - Automatically appends CORS headers to responses as middleware to bypass browser same-origin policies.
  • Cross-Origin Resource Sharing - Provides a comprehensive system for restricting API access to trusted domains using CORS policies.
  • Cross-Origin Resource Sharing (CORS) Policies - Uses CORS headers to restrict or allow web requests from different origins.
  • Cross-Origin Resource Sharing Policies - Defines which origins, HTTP methods, and headers are allowed to access server resources through CORS policies.
  • Dynamic - Provides a callback mechanism to validate request origins against a database or custom logic at runtime.
  • Preflight Request Interception - Detects HTTP OPTIONS requests and returns a success response early to bypass further application logic.
  • CORS Pre-Flight Handling - Intercepts HTTP OPTIONS requests to validate cross-origin permissions before actual request processing.
  • CORS Preflight Handlers - Automatically responds to OPTIONS requests so browsers can verify cross-origin permissions before the actual request.
  • Cross-Origin Security Policies - Computes cross-origin security policies on the fly based on the properties of incoming requests.
  • Scriptable Access Controls - Implements programmable logic to evaluate whether a specific incoming request origin should be granted access.
  • Node.js API Security - Controls which external domains can access server resources by validating request origins and managing allowed HTTP methods.
  • Request Policy Handlers - Implements middleware logic to compute and enforce unique CORS policies for each incoming request.
  • Database and Backend - Middleware for enabling Cross-Origin Resource Sharing in Express.

Star history

Star history chart for expressjs/corsStar history chart for expressjs/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

Frequently asked questions

What does expressjs/cors do?

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.

What are the main features of expressjs/cors?

The main features of expressjs/cors are: CORS Header Management, CORS Middleware, CORS Header Injection, Cross-Origin Resource Sharing, Cross-Origin Resource Sharing (CORS) Policies, Cross-Origin Resource Sharing Policies, Dynamic, Preflight Request Interception.

What are some open-source alternatives to expressjs/cors?

Open-source alternatives to expressjs/cors include: adamchainz/django-cors-headers — django-cors-headers is a middleware for Django that manages Cross-Origin Resource Sharing headers to control which… ottoyiu/django-cors-headers — django-cors-headers is a Django application utility for managing cross-origin resource sharing. It adds HTTP headers… fruitcake/laravel-cors — This project is a CORS header manager and security plugin for Laravel. It functions as middleware that adds… barryvdh/laravel-cors — laravel-cors is a middleware package for Laravel applications that manages Cross-Origin Resource Sharing. It functions… codeigniter4/codeigniter4 — CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web… hacdias/webdav — This project is a self-hosted WebDAV file server and HTTP file manager that exposes a local file system for remote…

Open-source alternatives to Cors

Similar open-source projects, ranked by how many features they share with Cors.
  • 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
  • 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
  • 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
  • barryvdh/laravel-corsbarryvdh avatar

    barryvdh/laravel-cors

    6,240View on GitHub↗

    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 syste

    PHP
    View on GitHub↗6,240
See all 30 alternatives to Cors→