data-govt-nz / ckanext-security

A CKAN extension to hold various security improvements for CKAN
GNU Affero General Public License v3.0
25 stars 32 forks source link

Handle http request without content-type #21

Closed ebuckley closed 5 years ago

ebuckley commented 5 years ago

A well formed http request should have a Content-type header, but when the content-type is not defined, it will cause our security middleware to throw a keyerror.

This change makes sure that an error is not thrown in this case. When there is no content-type header, the token will not be refreshed