awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
expressjs avatar

expressjs/cors

0
View on GitHub↗
6,194 星标·501 分支·JavaScript·MIT·6 次浏览

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 历史

expressjs/cors 的 Star 历史图表expressjs/cors 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Cors 的开源替代方案

相似的开源项目,按与 Cors 的功能重合度排序。
  • adamchainz/django-cors-headersadamchainz 的头像

    adamchainz/django-cors-headers

    5,587在 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
    在 GitHub 上查看↗5,587
  • ottoyiu/django-cors-headersottoyiu 的头像

    ottoyiu/django-cors-headers

    5,587在 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
    在 GitHub 上查看↗5,587
  • fruitcake/laravel-corsfruitcake 的头像

    fruitcake/laravel-cors

    6,240在 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
    在 GitHub 上查看↗6,240
  • barryvdh/laravel-corsbarryvdh 的头像

    barryvdh/laravel-cors

    6,240在 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
    在 GitHub 上查看↗6,240
查看 Cors 的所有 30 个替代方案→

常见问题解答

expressjs/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.

expressjs/cors 的主要功能有哪些?

expressjs/cors 的主要功能包括: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。

expressjs/cors 有哪些开源替代品?

expressjs/cors 的开源替代品包括: 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… developit/express-es6-rest-api — Express es6 rest api is a starter template for building RESTful backend applications using modern JavaScript syntax…