You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make an anti-virus middle ware which first check the uploaded files with help of lua-resty-upload and if they are not infected proxy_pass them to some dynamic proxy target.
I was able to handle the first part easily thanks to lua-resty-upload but the issue is when I proxy_pass the request after anti-virus check the body is empty. which seems pretty normal because lua-resty-upload has consumed the body already.
So I should reconstruct the body again after virus check, But I don't have the raw binary data of request at that point to easily reconstruct the body, all I have is parsed body which is hard to be converted to raw binary again.
Is there any shortcut method which can give me the raw binary data after process of lua-resty-upload is finished?
The text was updated successfully, but these errors were encountered:
So that it rewrites the buffer back (while it reads it). Currently you cannot use e.g. proxy module to forward the body read by lua-resty-upload. So in that sense it is not proxy friendly currently.
I'm trying to make an anti-virus middle ware which first check the uploaded files with help of lua-resty-upload and if they are not infected proxy_pass them to some dynamic proxy target.
I was able to handle the first part easily thanks to lua-resty-upload but the issue is when I proxy_pass the request after anti-virus check the body is empty. which seems pretty normal because lua-resty-upload has consumed the body already.
So I should reconstruct the body again after virus check, But I don't have the raw binary data of request at that point to easily reconstruct the body, all I have is parsed body which is hard to be converted to raw binary again.
Is there any shortcut method which can give me the raw binary data after process of lua-resty-upload is finished?
The text was updated successfully, but these errors were encountered: