Configuration

Invenio REST configuration.

Please also see Flask-CORS for many more configuration options.

invenio_rest.config.CORS_EXPOSE_HEADERS = [u'ETag', u'Link', u'X-RateLimit-Limit', u'X-RateLimit-Remaining', u'X-RateLimit-Reset', u'Content-Type']

Expose the following headers.

Note

Overwrites Flask-CORS configuration.

invenio_rest.config.CORS_RESOURCES = u'*'

Dictionary for configuring CORS for endpoints.

See Flask-CORS for further details.

Note

Overwrites Flask-CORS configuration.

invenio_rest.config.CORS_SEND_WILDCARD = True

Sending wildcard CORS header.

Note

Overwrites Flask-CORS configuration.

invenio_rest.config.REST_ENABLE_CORS = False

Enable CORS configuration. (Default: False)

invenio_rest.config.REST_MIMETYPE_QUERY_ARG_NAME = None
Name of the query argument to specify the mimetype wanted for the output.
Set it to None to disable.

Note

You can customize the query argument name by specifying it as a string:

REST_MIMETYPE_QUERY_ARG_NAME = 'format'

With this value, the url will be:

/api/record/<id>?format=<value>

You can set the accepted values passing a dictionary to the key record_serializers_aliases:

record_serializers_aliases={
   'json': 'application/json',
   'marc21': 'application/marcxml+xml'
}