1.0.2 • Published 5 years ago

lighting-plugin-proxy v1.0.2

Weekly downloads
15
License
-
Repository
-
Last release
5 years ago

lighting-plugin-proxy 支持为 light 工程的请求配置代理地址。

安装

注:安装 proxy 插件之前,请确保您已经安装 lighting 脚手架工具

light plugin -a proxy //安装

light plugin -u proxy //更新

light plugin -r proxy //卸载

使用

在工程根目录下的 project.json 中注册 proxy 插件,并进行自定义配置:

{
    "project":"lightdemo",
    "version":"0.0.1",
    "desc":"lightdemo",
    "type":"vue",
    "plugins":["proxy"],
    "pluginConfig": {
        "proxy": {
            "/stream1": {
                "target": "https://www.toutiao.com",
                "cookiePathRewrite": {
                    "/test/":"/"
                },
                "changeOrigin": true
            },
            "/stream2": "https://www.toutiao.com"
        }
    }
}

文档

了解更多 lighting-plugin-proxy 插件的信息,请点击这里

更新记录

v1.0.1

  1. 支持自定义参数配置。
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago