@gauseen/nuxt-proxy

nuxt proxy module
1,306 16
Install
npm install @gauseen/nuxt-proxy
Latest Version:1.0.1
License:ISC
Last Updated:Mar 22, 2018
Links: GitHub  ·  npm
Maintainer: gauseen

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]

Related Packages

nuxt-proxy

Http-proxy middleware for Nuxt 3.

93,870
h3-proxy

A proxy event handler for h3, using proxyRequest.

141,147 17
nuxt-resource-hints

Nuxt module that adds HTTP header resource hints for resources in your Nuxt App.

7,868 1
nuxt-remote-fn

Remote Functions. Instead of Event Handlers.

1,948
@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903

Version History

Version Released License
1.0.1 ISC
1.0.0 ISC