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/03/24 08:38:27 UTC

[GitHub] [apisix] purekeeper opened a new issue #6710: help request: Add a header if not exist not overwrite

purekeeper opened a new issue #6710:
URL: https://github.com/apache/apisix/issues/6710


   ### Description
   
   How can i add a header if not exist ,don't overwite if exist.which plugin shoudl used, proxy-rewite is not suitable,beacause it will overwrite if exist
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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 #6710: help request: Add a header if exist not overwrite

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


   @purekeeper Currently, you may support this by the serverless plugin: https://apisix.apache.org/docs/apisix/plugins/serverless.


-- 
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] kwanhur commented on issue #6710: help request: Add a header if exist not overwrite

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


   - If the header was on request, `proxy-rewrite` plugin is a better choice.
   - If it's on response, `response-rewrite` plugin is a better choice.
   
   But both them have no support .
   
   Support to set header if nonexistent, they'll easier to reach intention than `serverless` plugin.


-- 
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] tzssangglass commented on issue #6710: help request: Add a header if exist not overwrite

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


   Another compromise is to use the `vars` on the route to distinguish between routes with a specified header and those without one, and to handle them separately.
   
   IMO, don't override if it exists: this will cause to check the all headers, which is inefficient.


-- 
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] soulbird commented on issue #6710: help request: Add a header if exist not overwrite

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


   Maybe, we can add a configuration to determine if headers needs to be rewritten


-- 
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