pull/88/head
			
			
		
		
							parent
							
								
									09dbc69131
								
							
						
					
					
						commit
						fe831c9ecf
					
				|  | @ -24,8 +24,12 @@ | |||
|     }, | ||||
|   }, | ||||
|   server: { | ||||
|     intercept: { | ||||
|       enabled: true, | ||||
|     intercepts: { | ||||
|       'dev-sidecar.docmirror.cn': { | ||||
|         '.*': { | ||||
|           proxy: 'dev-sidecar-preview.docmirror.cn', | ||||
|         }, | ||||
|       }, | ||||
|     }, | ||||
|   }, | ||||
|   } | ||||
| } | ||||
|  | @ -1,2 +0,0 @@ | |||
| VUE_APP_PUBLISH_URL=http://dev-sidecar.docmirror.cn/update/preview/ | ||||
| VUE_APP_PUBLISH_PROVIDER=generic | ||||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|   "name": "@docmirror/dev-sidecar-gui", | ||||
|   "version": "1.6.0", | ||||
|   "version": "1.5.0", | ||||
|   "private": false, | ||||
|   "license": "MPL-2.0", | ||||
|   "main": "background.js", | ||||
|  | @ -8,9 +8,7 @@ | |||
|     "serve": "vue-cli-service serve", | ||||
|     "lint": "vue-cli-service lint", | ||||
|     "electron:build": "vue-cli-service electron:build", | ||||
|     "electron:build:pre": "cross-env NODE_ENV=production && vue-cli-service electron:build --mode pre", | ||||
|     "electron": "vue-cli-service electron:serve", | ||||
|     "electron:pre": "vue-cli-service electron:serve --mode pre", | ||||
|     "postinstall": "electron-builder install-app-deps", | ||||
|     "postuninstall": "electron-builder install-app-deps", | ||||
|     "electron:icons": "electron-icon-builder --input=./public/logo/win.png --output=build --flatten", | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ module.exports = { | |||
|       title: 'DevSidecar-给开发者的边车辅助工具' | ||||
|     } | ||||
|   }, | ||||
|   configureWebpack: config => { | ||||
|   configureWebpack: (config) => { | ||||
|     const configNew = { | ||||
|       plugins: [ | ||||
|         new webpack.DefinePlugin({ 'global.GENTLY': true }) | ||||
|  |  | |||
|  | @ -28,7 +28,13 @@ module.exports = { | |||
|       } | ||||
|     } | ||||
| 
 | ||||
|     let proxyTarget = proxyConf + req.url | ||||
|     let uri = req.url | ||||
|     if (uri.indexOf('http') === 0) { | ||||
|       // eslint-disable-next-line node/no-deprecated-api
 | ||||
|       const URL = url.parse(uri) | ||||
|       uri = URL.path | ||||
|     } | ||||
|     let proxyTarget = proxyConf + uri | ||||
|     if (interceptOpt.replace) { | ||||
|       const regexp = new RegExp(interceptOpt.replace) | ||||
|       proxyTarget = req.url.replace(regexp, proxyConf) | ||||
|  | @ -50,7 +56,7 @@ module.exports = { | |||
|     if (URL.port == null) { | ||||
|       rOptions.port = rOptions.protocol === 'https:' ? 443 : 80 | ||||
|     } | ||||
|     log.info('proxy:', rOptions.hostname, proxyTarget) | ||||
|     log.info('proxy:', rOptions.hostname, 'target', proxyTarget) | ||||
|     if (context.requestCount) { | ||||
|       log.debug('proxy choice:', JSON.stringify(context.requestCount)) | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 xiaojunnuo
						xiaojunnuo