Merge pull request #1425 from henchies/patch-1

Update article.md
This commit is contained in:
Ilya Kantor 2019-10-10 11:00:16 +03:00 committed by GitHub
commit a57edc1036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ Cross-origin requests -- those sent to another domain (even a subdomain) or prot
That policy is called "CORS": Cross-Origin Resource Sharing.
## Why CORS is needed? A brief history
## Why is CORS needed? A brief history
CORS exists to protect the internet from evil hackers.
@ -95,7 +95,7 @@ That works, and doesn't violate security, because both sides agreed to pass the
After a while, networking methods appeared in browser JavaScript.
At first, cross-origin requests were forbidden. But as a result of long discussions, cross-origin requests were allowed, but any new capabilities unless require an explicit allowance by the server, expressed in special headers.
At first, cross-origin requests were forbidden. But as a result of long discussions, cross-origin requests were allowed, but with any new capabilities requiring an explicit allowance by the server, expressed in special headers.
## Simple requests
@ -341,7 +341,7 @@ Access-Control-Allow-Origin: https://javascript.info
Access-Control-Allow-Credentials: true
```
Please note: `Access-Control-Allow-Origin` is prohibited from using a star `*` for requests with credentials. Like shown above, there must be exactly the origin there. That's an additional safety measure, to ensure that the server really knows who it trusts to make such requests.
Please note: `Access-Control-Allow-Origin` is prohibited from using a star `*` for requests with credentials. Like shown above, it must provide the exact origin there. That's an additional safety measure, to ensure that the server really knows who it trusts to make such requests.
## Summary