Docker_manager doesn't accept API keys

I’m trying to mimic the upgradeAll call in the docker_manager with the following command.

curl -X POST "https://example.com/admin/docker/upgrade" \
 -H "Content-type: application/x-www-form-urlencoded" \
 -d "api_key=1234" \
 -d "api_username=system"
 -d "path=all" 

The endpoint returns: ['BAD CSRF']

In the code, it looks like API keys aren’t supported. I think this is probably a bug. If so, may I send in a PR to fix?

4 Likes

Sure, supporting upgrade via API would make it more consistent.

2 Likes

https://github.com/discourse/docker_manager/pull/52

No rush to merge. Whenever y’all have time!

6 Likes

PR has been merged :tada: