Skip to content

Commit

Permalink
update CORS expose_headers param with etag
Browse files Browse the repository at this point in the history
  • Loading branch information
David FREDERIQUE committed Sep 18, 2017
1 parent f004486 commit 0ddab16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flask_rest_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def init_app(self, app):

# CORS is setup the most permissive way, to avoid cross-origin
# issues when serving the spec or trying it using swagger-ui.
CORS(app)
expose_headers = []
if is_etag_enabled(app):
expose_headers.append('Etag')
CORS(app, expose_headers=expose_headers)

# Can't register a handler for HTTPException, so let's register
# default handler for each code explicitly.
Expand Down

0 comments on commit 0ddab16

Please sign in to comment.