Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awesome-static-proxy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-static-proxy

用来做静态资源代理到本地的工具

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Static-Proxy

前端静态资源代理

说明

底层基于 anyproxy,专注于解决前端开发和调试中资源代理

使用场景

在线本地调试(日常,预发,线上)

安装

$ tnpm i awesome-static-proxy

使用

在根目录建proxy.config.js文件

参数配置

根据rule的正则来匹配对应的静态资源代理到对应的dest

module.exports = {
  proxy: {
    rewrite: [{
      rule: /trip\/titan\/([\d\.]*)\/(.*).js/,
      dest: 'https://127.0.0.1:7000/$2.js'
    }, {
      rule: /trip\/titan\/([\d\.]*)\/(.*)\.css/,
      dest: 'https://127.0.0.1:7000/$2.css'
    }]
  }
};

运行

$ proxy start

安装证书

执行命令生成证书

$ proxy cert

生成证书后需要手动去信任证书,详情参考 anyproxy 官网

changelog

1.2.1

  • 对外暴露 disable 方法, umi-plugin-proxy 使用

1.0.0

  • 第一版发布
    • 仅支持 https 的静态资源代理
    • 添加 https 证书功能

Keywords

FAQs

Package last updated on 06 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc