tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

tnt_http_rest_methods directive not disallowing DELETE #115

Closed donbarthel closed 5 years ago

donbarthel commented 6 years ago

I have the tnt_http_rest_methods directive defined thus:

tnt_http_rest_methods get post;

Notice no 'delete' is specified. However, when I send a DELETE request, the call is passed through to my Lua function.

I expected the request to be rejected. Do I misunderstand the purpose of this directive?

The full definition in nginx.conf is:

      location /api/v1/users {
        # REST mode on
        tnt_http_rest_methods get post;

        # Pass http headers and uri
        tnt_pass_http_request on;

        # Module on
        tnt_pass backend;

        tnt_method v1_users;
      }
dedok commented 6 years ago

Sorry for long the answer, was offline.

Yep, this is a bug. Thank you for the report! I will fix this till Monday.

dedok commented 5 years ago

Fixed in: 549b48e0f19cdfd24be1c51a3cbc652b74790a9d

dedok commented 5 years ago

I close this one. The Bug inside the documentation fixed. Thank you for report.