Closed SpecialYang closed 11 months ago
@SpecialYang We never say "host level" in APISIX, you need to convert the concept to the APISIX terms like a Service, a Route, combining with your business.
E.g., if you use a Service in APISIX to manage all routes in the same host, you may need to enable the redirect
plugin in this Service.
The Service defined in the APISIX looks like it combines more than one routes but must be forwarded for only one upstream. In micro-services case, routes under the same host can be forwarded for more micro-services. I think the Service concept is limited and can not solve my issue.
The Service defined in the APISIX looks like it combines more than one routes but must be forwarded for only one upstream. In micro-services case, routes under the same host can be forwarded for more micro-services. I think the Service concept is limited and can not solve my issue.
Not clear about your model. You may need to write some codes to implement your demands (with a plugin runner, or using the serverless plugin).
example.com/app1 -> upstream (app1)
example.com/app2 -> upstream (app2)
...
example.com/appn -> upstream (appn)
I hope I can set http redirect to https in one place which make the above all routes under the same host example.com
redirect to https://example.com/app(x)
when i call http://example.com/app(x)
.
Got it. I'm afraid that the existing APISIX plugins won't satisfy your need. Maybe you can use the serverless plugin to check the following things:
example.com
;HTTP
;If both the conditions are met, then redirect the requests, and constructing the Location header with HTTPS schema (be careful about the HTTPS port).
@SpecialYang do you have any further updates/questions? If not please close this issue. Thanks.
Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
Description
I'm tired of doing http redirect to https for every route. Can we just open this redirect on the host level?
Just like istio does.
Environment
apisix version
):uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):