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

@gauseen/nuxt-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

@gauseen/nuxt-proxy

nuxt proxy module

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Nuxt.js Proxy Module

参考资料请看 nuxtjs api, nodejs 中间件 http-proxy-middleware api

使用步骤:

  1. 安装 @gauseen/nuxt-proxy 依赖资源
npm install --save-dev @gauseen/nuxt-proxy
  1. 添加 @gauseen/nuxt-proxy 资源至 nuxt.config.js 文件的 modules 对象之下

例如:

// nuxt.config.js

modules: [
	// 请求代理配置,解决跨域
	'@gauseen/nuxt-proxy',
],
proxyTable: {
	'/api': { target: 'http://example.com', ws: false }
},

注:

/api ———————— 每个接口特定标识字段 [String]
target —————— 目标代理服务 [String]
ws —————————— 是否支持 websocket 代理 [Boolean]

Keywords

FAQs

Package last updated on 22 Mar 2018

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