I am working on a REST API with python-eve. I use authorization with a subclass of the default TokenAuth class as described in the documentation. However now a GET Request to / replies with error code 401 and the message "Please provide proper credentials".
I want a GET request to / to just return the default list of available resources without authorization.
For a regular endpoint I would just add GET to the public_methods property in the schema, but / does not have a schema, how can I make it a public endpoint again?
You could go the other way around. Set
PUBLIC_METHODS
to['GET']
so home endpoint is accessible. Then you setpublic_methods
to[]
for every protected resource.