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/07 13:58:22 UTC

[GitHub] [apisix] kellyseeme opened a new issue, #8269: how to set route for nginx return directive

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

   ### Description
   
   in my nginx.conf,i want to put this config to apisix config,
   nginx.conf:
   `location /test {
            add_header 'Access-Control-Allow-Origin' "*";
            add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
            add_header 'Access-Control-Allow-Headers' '*';
            if ($request_method = 'OPTIONS') {
                return 208;
            }`
   
   in apisix,how to set this for one route.tks.
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.14.1
   - 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.apache.org

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


[GitHub] [apisix] kellyseeme commented on issue #8269: how to set route for nginx return directive

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

   tks for reply .


-- 
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 #8269: how to set route for nginx return directive

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

   Try the cors plugin and fault-injection plugin ( it allows you to return custom message when some rules matched).


-- 
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] kellyseeme closed issue #8269: how to set route for nginx return directive

Posted by GitBox <gi...@apache.org>.
kellyseeme closed issue #8269: how to set route for nginx  return directive
URL: https://github.com/apache/apisix/issues/8269


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