GitHub 中文社区
回车: Github搜索    Shift+回车: Google搜索
论坛
排行榜
趋势
登录

©2025 GitHub中文社区论坛GitHub官网网站地图GitHub官方翻译

  • X iconGitHub on X
  • Facebook iconGitHub on Facebook
  • Linkedin iconGitHub on LinkedIn
  • YouTube iconGitHub on YouTube
  • Twitch iconGitHub on Twitch
  • TikTok iconGitHub on TikTok
  • GitHub markGitHub’s organization on GitHub
集合主题趋势排行榜
#

Cross-origin resource sharing (CORS)

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be accessed from another domain outside the domain from which the first resource was served. CORS also relies on a mechanism by which browsers make a "preflight" request to the server hosting the cross-origin resource, in order to check that the server will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request. For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts. For example, fetch() and XMLHttpRequest follow the same-origin policy. This means that a web application using those APIs can only request resources from the same origin the application was loaded from unless the response from other origins includes the right CORS headers.

Resource types

  • Invocations of fetch() or XMLHttpRequest
  • Web Fonts (for cross-domain font usage in @font-face within CSS), so that servers can deploy TrueType fonts that can only be loaded cross-origin and used by websites that are permitted to do so
  • WebGL textures
  • Images/video frames drawn to a canvas using drawImage()
  • CSS shapes from images
  • scripts
  • iframes

Created by WHATWG, Matt Oshry, Brad Porter, Michael Bodell, Tellme Networks

发布于 May 2006

Website
fetch.spec.whatwg.org
Wikipedia
维基百科

相关主题

Ajax
https://static.github-zh.com/github_avatars/fruitcake?size=40
fruitcake / laravel-cors

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application

PHPLaravelmiddlewareCross-origin resource sharing (CORS)Hacktoberfest
PHP 6.27 k
2 年前
https://static.github-zh.com/github_avatars/expressjs?size=40
expressjs / cors

Node.js CORS middleware

JavaScriptNode.jsExpressmiddlewareCross-origin resource sharing (CORS)
JavaScript 6.14 k
10 天前
https://static.github-zh.com/github_avatars/adamchainz?size=40
adamchainz / django-cors-headers

Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

DjangoCross-origin resource sharing (CORS)
Python 5.48 k
11 天前
https://static.github-zh.com/github_avatars/anjoy8?size=40
anjoy8 / Blog.Core

💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:

netcoreautomapperrepositoryt4netcore-webapisqlsugarcoredtoRedisaopIoC (Disambiguation)swaggerCross-origin resource sharing (CORS)JSON Web Tokensautofac依赖注入rbacsqlsugarnet7
C# 5.21 k
20 天前
https://static.github-zh.com/github_avatars/everywall?size=40
everywall / ladder

Selfhosted alternative to 12ft.io. and 1ft.io bypass paywalls with a proxy ladder and remove CORS headers from any URL

bypasspaywallpaywall-blockerpaywall-bypasserCross-origin resource sharing (CORS)cors-proxy
Go 4.8 k
8 个月前
https://static.github-zh.com/github_avatars/jpillora?size=40
jpillora / xdomain

A pure JavaScript CORS alternative

cross-domainCross-origin resource sharing (CORS)JavaScriptxhr
JavaScript 3.14 k
3 年前
https://static.github-zh.com/github_avatars/JoyChou93?size=40
JoyChou93 / java-sec-code

Java web common vulnerabilities and security code which is base on springboot and spring security

JavaCode安全xxercedeserializetomcatsqlissrfrmiCross-origin resource sharing (CORS)jsonpWebspelbenchmark
Java 2.52 k
6 个月前
https://static.github-zh.com/github_avatars/developit?size=40
developit / express-es6-rest-api

🔋 Starter project for an ES6 RESTful Express API.

Cross-origin resource sharing (CORS)MongooseExpressECMAScriptes2015APIJavaScript模板
JavaScript 2.46 k
2 年前
https://static.github-zh.com/github_avatars/nelmio?size=40
nelmio / NelmioCorsBundle

Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application

PHPSymfonybundlecors-requestCross-origin resource sharing (CORS)cross-origin-resource-sharing
PHP 1.92 k
1 年前
https://static.github-zh.com/github_avatars/s0md3v?size=40
s0md3v / Corsy

CORS Misconfiguration Scanner

Cross-origin resource sharing (CORS)vulnerability-scanner
Python 1.44 k
3 年前
roottusk/vapi
https://static.github-zh.com/github_avatars/roottusk?size=40
roottusk / vapi

vAPI is Vulnerable Adversely Programmed Interface which is Self-Hostable API that mimics OWASP API Top 10 scenarios through Exercises.

owaspAPIapitop10owasp-top-10owasp-top-tenvulnerable-applicationappsecappsec-tutorialsBug BountyHacktoberfestDockerCross-origin resource sharing (CORS)PHPPostmanhacktoberfest-acceptedexercises
HTML 1.26 k
5 个月前
https://static.github-zh.com/github_avatars/francescomalatesta?size=40
francescomalatesta / laravel-api-boilerplate-jwt

A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.

LaravelAPIREST APIJSON Web Tokens模板dingoCross-origin resource sharing (CORS)
PHP 1.18 k
6 年前
https://static.github-zh.com/github_avatars/chenjj?size=40
chenjj / CORScanner

🎯 Fast CORS misconfiguration vulnerabilities scanner

Cross-origin resource sharing (CORS)Pythonweb-securityvulnerability-scanners
Python 1.1 k
4 年前
https://static.github-zh.com/github_avatars/xianhc?size=40
xianhc / ApeVolo.Admin

.Net 8 、SqlSugar ORM、Vue 2.X、RBAC。前后端分离的开箱则用的企业级的权限开发框架(中后台管理系统)

MySQLRedisCross-origin resource sharing (CORS)JSON Web Tokens依赖注入swagger-uinetcoreaopasync/awaitautofacautomappersqlsugarcoreAuthenticationAuthorizationserilog
C# 1.05 k
21 天前
https://static.github-zh.com/github_avatars/javieraviles?size=40
javieraviles / node-typescript-koa-rest

REST API boilerplate using NodeJS and KOA2, typescript. Logging and JWT as middlewares. TypeORM with class-validator, SQL CRUD. Docker included. Swagger docs, actions CI and valuable README

Node.jsKoaTypeScriptREST APIkoa-routernodemonDockerSQLtypeormCRUDclass-validatorHerokuCross-origin resource sharing (CORS)JSON Web TokenshelmetswaggerActions
TypeScript 1.01 k
1 年前
https://static.github-zh.com/github_avatars/corydolphin?size=40
corydolphin / flask-cors

Cross Origin Resource Sharing ( CORS ) support for Flask

Pythonflask-extensionsCross-origin resource sharing (CORS)
Python 919
5 天前
https://static.github-zh.com/github_avatars/Baroshem?size=40
Baroshem / nuxt-security

🛡 Automatically configure your app to follow OWASP security patterns and principles by using HTTP Headers and Middleware

moduleNuxt.jsowasp安全Vue.jsCross-origin resource sharing (CORS)rate-limitingxsscsrf
TypeScript 896
1 个月前
https://static.github-zh.com/github_avatars/xuexb?size=40
xuexb / learn-nginx

Nginx 入门指南

nginxrewriteproxyCross-origin resource sharing (CORS)
Shell 876
5 年前
https://static.github-zh.com/github_avatars/gnuns?size=40
gnuns / allOrigins

👽 Pull content from any page as JSON via API

Cross-origin resource sharing (CORS)JSONJavaScriptAPINode.jsgziprequest
JavaScript 852
2 年前
https://static.github-zh.com/github_avatars/OP-Engineering?size=40
OP-Engineering / link-preview-js

⛓ Extract web links information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.

Parsingextractjs-libraryextract-informationNode.jsReact NativeHTTPJavaScriptTypeScriptlinkCross-origin resource sharing (CORS)ChromeFirefoxsafari
TypeScript 811
21 天前
loading...