Skip to content

tnt_http_rest_methods directive not disallowing DELETE #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
donbarthel opened this issue Mar 13, 2018 · 3 comments
Closed

tnt_http_rest_methods directive not disallowing DELETE #115

donbarthel opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@donbarthel
Copy link

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 dedok self-assigned this Mar 23, 2018
@dedok dedok added the bug Something isn't working label Mar 23, 2018
@dedok
Copy link
Contributor

dedok commented Mar 23, 2018

Sorry for long the answer, was offline.

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

dedok added a commit that referenced this issue Apr 15, 2019
@dedok
Copy link
Contributor

dedok commented Apr 15, 2019

Fixed in: 549b48e

@dedok
Copy link
Contributor

dedok commented Apr 15, 2019

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

@dedok dedok closed this as completed Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants