-
Notifications
You must be signed in to change notification settings - Fork 272
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
feature: add bypass_if_checks method to ngx.resp #495
base: master
Are you sure you want to change the base?
Conversation
I hereby granted the copyright of the changes in this pull request to the authors of this lua-resty-core project. Signed-off-by: tzssangglass <[email protected]>
sister PR: openresty/lua-nginx-module#2401 |
if not r then | ||
error("no request found") | ||
end | ||
return C.ngx_http_lua_ffi_bypass_if_checks(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not need any return value here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about also removing the return NGX_OK;
in https://github.com/openresty/lua-nginx-module/pull/2401/files#diff-ea7694db95d4b4f2da2951cf882953a64e545494e6b9302cb9e80d0abf8f8fbbR4562?
@@ -87,6 +88,14 @@ status with an optional reason. The `reason` should be a string. | |||
|
|||
[Back to TOC](#table-of-contents) | |||
|
|||
bypass_if_checks | |||
------------------ | |||
**syntax:** *ngx_resp.bypass_if_checks()* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a blank line after it. And don't forget to add the [Back to TOC](#table-of-contents)
Bypasses the conditional header checks as defined in RFC 9110 for the current request. | ||
This method is useful when you need to skip validation of headers such as `If-Modified-Since`, | ||
`If-None-Match`, `If-Range`, `If-Unmodified-Since`, and `If-Match`, allowing the response to | ||
proceed without evaluating these conditions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about also writing down the Why
? When people have to call this method?
I hereby granted the copyright of the changes in this pull request to the authors of this lua-resty-core project.
I hereby granted the copyright of the changes in this pull request
to the authors of this lua-resty-core project.