proxy

package
v0.0.0-...-1b41cfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 5 Imported by: 0

README

帮助文档 - 路由转发

通过配置转发规则,程序会产生ReverseProxy来转发你的请求

注意,这表示请求被转发前的鉴权流程是必须的,未来可能支持流程是可选的

流程说明

目前反向代理采用有限资源设计,即未注册的代理资源(路径)无法得到转发,其原因是因为要精准控制每个router的权限

这一点尤其重要,所以添加的主机仅仅只是为了执行代理资源,而不是一劳永逸的无条件转发,当然你可以更改他

添加代理资源时的Path就是被代理主机上的真实Path,然而通过网关访问时,就需要通过网关代理资源下加上Path(如/api/v1/proxy)去访问

每一个流经网关的代理请求,都必须经过用户校验和资源权限校验,即用户的直接或间接角色能够访问资源或路径,否则失败

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHost

func GetHost(id int) *httputil.ReverseProxy

GetHost 获取Host

func InitHost

func InitHost()

InitHost 刷新Host

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL