Browse Source

Merge e51a7169da into 1d434dec47

pull/13468/merge
alv2017 3 days ago
committed by GitHub
parent
commit
c2dfd08b16
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      docs/en/docs/tutorial/cors.md

4
docs/en/docs/tutorial/cors.md

@ -2,6 +2,10 @@
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" class="external-link" target="_blank">CORS or "Cross-Origin Resource Sharing"</a> refers to the situations when a frontend running in a browser has JavaScript code that communicates with a backend, and the backend is in a different "origin" than the frontend.
For security reasons a front-end application running in a browser can only request resources (such as APIs, stylesheets, and images) from the same origin the application was loaded from, unless the response from other origins includes the right CORS headers.
CORS is a security standard implemented by browsers. It enables scripts running in a browser to securely access resources located outside the browser domain.
## Origin
An origin is the combination of protocol (`http`, `https`), domain (`myapp.com`, `localhost`, `localhost.tiangolo.com`), and port (`80`, `443`, `8080`).

Loading…
Cancel
Save