pathproxy

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pathproxy 路径代理模块:把 /api/pathproxy/<path> 的请求按配置 规则转发到对应上游 URL,支持精确路径与末尾 "*" 通配。

规则在 modules.pathproxy.path_rules 中配置:

path 为模块前缀 /api/pathproxy 之后的路径;末尾 "*" 表示通配其后任意 路径,命中后把通配部分拼接在 target 的路径之后。请求方法、查询参数与 请求体原样转发;headers 中的配置会设置/覆盖到上游请求。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct{}

Controller 路径代理模块控制器。

func (*Controller) Enabled

func (c *Controller) Enabled() bool

Enabled 模块是否启用。

func (*Controller) ModuleName

func (c *Controller) ModuleName() string

ModuleName 模块名,即路由前缀。

func (*Controller) Register

func (c *Controller) Register(r *gin.RouterGroup)

Register 注册路由:/api/pathproxy/*proxyPath,支持任意 HTTP 方法。

Jump to

Keyboard shortcuts

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