Same-origin policy violation notes

This commit is contained in:
Bez Hermoso 2014-08-26 17:27:41 -07:00
parent 9b544ef535
commit 4be579f7a2

View File

@ -94,7 +94,9 @@ nelmio_api_swagger:
prefix: /api-docs
```
Et voila!, simply specify http://yourdomain.com/api-docs in your Swagger client and you are good to go.
Et voila!, simply specify http://yourdomain.com/api-docs in your `swagger-ui` instance and you are good to go.
__Note__: If your `swagger-ui` instance does not live under the same domain, you will probably encounter some problems related to same-origin policy violations. [NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) can solve this problem for you. Read through how to allow cross-site requests for the `/api-docs/*` pages.
### Dumping the Swagger-compliant JSON API definitions