Ensure API urls answer with and without a trailing slash (#877)