Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 5-network/05-fetch-crossorigin/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down