Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS Support #6

Closed
ngdinhtoan opened this issue Apr 24, 2017 · 0 comments · Fixed by #11
Closed

CORS Support #6

ngdinhtoan opened this issue Apr 24, 2017 · 0 comments · Fixed by #11
Milestone

Comments

@ngdinhtoan
Copy link
Contributor

The HTTP Handler func (g *Generator) ServeHTTP(w http.ResponseWriter, r *http.Request) should support CORS.

E.g:

$ curl -I "http://petstore.swagger.io/v2/swagger.json"
HTTP/1.1 200 OK
Date: Sat, 31 Jan 2015 23:05:44 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, PATCH, OPTIONS
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Content-Type: application/json
Content-Length: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant