You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/05 02:34:17 UTC

[GitHub] [apisix] oyiadin opened a new issue, #8249: feat: Can serverless plugin stops the request and make an immediate response?

oyiadin opened a new issue, #8249:
URL: https://github.com/apache/apisix/issues/8249

   ### Description
   
   Here is what I want to archive: 
   
   If something very simple, but needs some extra calculation, fulfilled, stops the request (don't send to upstream) and response with a message immediately.
   
   The `serverless` plugin would be the very suitable one for me to handle the condition that I need, but I need a way to intercept the request and make response. For example, we can utilize the return value of serverless's `call_funcs`, if it's not nil then pass to the nginx logics.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] oyiadin commented on issue #8249: feat: Can serverless plugin stops the request and make an immediate response?

Posted by GitBox <gi...@apache.org>.
oyiadin commented on issue #8249:
URL: https://github.com/apache/apisix/issues/8249#issuecomment-1304784876

   oops, sorry, I've forgot that my local branch is still at release/2.11.
   I've seen that it's already supported in the latest branch, so no more question for me, thx for your comments!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] oyiadin closed issue #8249: feat: Can serverless plugin stops the request and make an immediate response?

Posted by GitBox <gi...@apache.org>.
oyiadin closed issue #8249: feat: Can serverless plugin stops the request and make an immediate response?
URL: https://github.com/apache/apisix/issues/8249


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] oyiadin commented on issue #8249: feat: Can serverless plugin stops the request and make an immediate response?

Posted by GitBox <gi...@apache.org>.
oyiadin commented on issue #8249:
URL: https://github.com/apache/apisix/issues/8249#issuecomment-1304785194

   maybe we can update the docs of serverless for this feature


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #8249: feat: Can serverless plugin stops the request and make an immediate response?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8249:
URL: https://github.com/apache/apisix/issues/8249#issuecomment-1304776380

   @oyiadin Yes, you can, I write the way here directly because I found it's not recorded. cc @tzssangglass 
   
   You can just return two values in your codes.
   
   ```lua
   return {code}, {body}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org