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/03 07:58:42 UTC

[GitHub] [apisix] AlinsRan opened a new issue, #8239: feat: Support adding header in proxy-rewrite plugin

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

   ### Description
   
   Currently, response-rewrite plugin only supports set / delete headers. The limitation makes some operations impossible. This feature is required to implement [Gateway API HTTPHeaderFilter](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1beta1.HTTPHeaderFilter).
   
   * Similar to #7794 
   
   ## expect
   ```json
   {
       "proxy-rewrite": {
           "headers": {
               "add": {
                   "X-Server-id": 3,
                   "X-Server-status": "on",
                   "X-Server-balancer_addr": "$balancer_ip:$balancer_port"
               }
           }
       }
   }
   ```
   ## acturl
   ```json
   {
       "proxy-rewrite": {
           "headers": {
               "X-Api-Version": "v1",
               "X-Api-Engine": "apisix",
               "X-Api-useless": ""
           }
       }
   }
   ```
   


-- 
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] AlinsRan commented on issue #8239: feat: Support adding header in proxy-rewrite plugin

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

   > `proxy-rewrite` plugin support to add headers, read: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-rewrite.md#attributes
   
   If the header exists, it will be overwritten.
   for example:
   1. current: `Cache-Control: max-age`
   2.  add plugin
   ```json
   {
       "proxy-rewrite": {
           "headers": {
               "add": {
                   "Cache-Control": "must-revalidate",
               }
           }
       }
   }
   ```
   3. result: `Cache-Control: max-age, must-revalidate`


-- 
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] AlinsRan commented on issue #8239: feat: Support adding header in proxy-rewrite plugin

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

   @spacewander cc


-- 
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] mscb402 commented on issue #8239: feat: Support adding header in proxy-rewrite plugin

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

   please assign to me


-- 
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] spacewander closed issue #8239: feat: Support adding header in proxy-rewrite plugin

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #8239: feat: Support adding header in proxy-rewrite plugin
URL: https://github.com/apache/apisix/issues/8239


-- 
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 #8239: feat: Support adding header in proxy-rewrite plugin

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

   `proxy-rewrite` plugin support to add headers, read: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-rewrite.md#attributes


-- 
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 #8239: feat: Support adding header in proxy-rewrite plugin

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

   I think the design of this part should be consistent with response-rewrite.


-- 
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 #8239: feat: Support adding header in proxy-rewrite plugin

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

   cc @mscb402 


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