imiskolee opened a new issue, #8471:
URL: https://github.com/apache/apisix/issues/8471
### Description
If we have a site called `www.a.b.com`, and it's already has a lots router
rules, then we have the new domain for the site `www.c.d.com`, so how to let
the new domain can be works all exists router rules? I am trying
`serverless-pre-function` Plugin, but I don't know how to let it work.
```lua
disable: false
functions:
- |-
return function(conf,ctx)
local mapping = {};
mapping["new_domain"] = "old_domain";
if mapping[ngx.var.host] then
//what shall we do here...
ngx.req.set_header('Host', mapping[ngx.var.host]);
end
end;
phase: rewrite
```
### Environment
- APISIX version (run `apisix version`): 3.5.0
- 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]