Using Nginx with the Glance API

I had the issue that the Glance API doesn’t work with the following configuration for Nginx.

server {
    location / {

Trying to create new images always failed with this error message.

Request returned failure status.
400 Bad Request
Invalid disk format 'None' for image.
    (HTTP 400)

The solution is rather simple. You have to allow underscores in HTTP headers.

underscores_in_headers on;

Also don’t forget to increase the client_max_body_size.