mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-30 03:50:25 +08:00
反向代理支持RequestPath、RequestURI等
This commit is contained in:
@@ -122,14 +122,14 @@ func (this *ReverseProxyService) UpdateReverseProxyBackupOrigins(ctx context.Con
|
||||
}
|
||||
|
||||
// 修改是否启用
|
||||
func (this *ReverseProxyService) UpdateReverseProxyIsOn(ctx context.Context, req *pb.UpdateReverseProxyIsOnRequest) (*pb.RPCUpdateSuccess, error) {
|
||||
func (this *ReverseProxyService) UpdateReverseProxy(ctx context.Context, req *pb.UpdateReverseProxyRequest) (*pb.RPCUpdateSuccess, error) {
|
||||
// 校验请求
|
||||
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = models.SharedReverseProxyDAO.UpdateReverseProxyIsOn(req.ReverseProxyId, req.IsOn)
|
||||
err = models.SharedReverseProxyDAO.UpdateReverseProxy(req.ReverseProxyId, req.RequestHost, req.RequestURI, req.StripPrefix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user