Skip to content

Commit

Permalink
Fix CORS docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saharj committed Sep 12, 2016
1 parent 807b296 commit 3ca8444
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npm start
* [Importing your Swagger document](./docs/import.md)
* [Development Guide](./docs/development.md)
* [Configuration Guide](./docs/config.md)
* [Cross Origin Request(CORS) issues](docs/cors.md)
* [Cross Origin Request Sharing(CORS) issues](docs/cors.md)

[Contributing](./CONTRIBUTING.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/cors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTTP access control (CORS) issues

Swagger Editor is a web application and by its nature is limited to [HTTP access control policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS). If you can't make calls using **Try this operation** component of the editor it's very likely because the server is not allowing the `swagger.io` domain to make [`XHR`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) (also known as AJAX) calls to it.
Swagger Editor is a web application and by its nature is limited to [HTTP access control policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS). If you can't make calls using **Try this operation** component of the editor it's very likely because the server is not allowing the `editor.swagger.io` domain to make [`XHR`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) (also known as AJAX) calls to it.

## How to fix CORS issues

Expand All @@ -12,7 +12,7 @@ To enable CORS in your server you need to add following headers to your HTTP res


```
Access-Control-Allow-Origin: http://swagger.io
Access-Control-Allow-Origin: editor.swagger.io
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
```

Expand Down

0 comments on commit 3ca8444

Please sign in to comment.