mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Add httpStaticCors to default settings file
This commit is contained in:
		
							
								
								
									
										14
									
								
								packages/node_modules/node-red/settings.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								packages/node_modules/node-red/settings.js
									
									
									
									
										vendored
									
									
								
							| @@ -139,6 +139,7 @@ module.exports = { | ||||
|  *  - httpNodeMiddleware | ||||
|  *  - httpStatic | ||||
|  *  - httpStaticRoot | ||||
|  *  - httpStaticCors | ||||
|  ******************************************************************************/ | ||||
|  | ||||
|     /** the tcp port that the Node-RED web server is listening on */ | ||||
| @@ -233,6 +234,9 @@ module.exports = { | ||||
|      *  OR multiple static sources can be created using an array of objects... | ||||
|      *  Each object can also contain an options object for further configuration. | ||||
|      *  See https://expressjs.com/en/api.html#express.static for available options. | ||||
|      *  They can also contain an option `cors` object to set specific Cross-Origin | ||||
|      *  Resource Sharing rules for the source. `httpStaticCors` can be used to | ||||
|      *  set a default cors policy across all static routes. | ||||
|      */ | ||||
|     //httpStatic: [ | ||||
|     //    {path: '/home/nol/pics/',    root: "/img/"}, | ||||
| @@ -250,6 +254,16 @@ module.exports = { | ||||
|      */ | ||||
|     //httpStaticRoot: '/static/', | ||||
|  | ||||
|     /** The following property can be used to configure cross-origin resource sharing | ||||
|      * in the http static routes. | ||||
|      * See https://github.com/troygoode/node-cors#configuration-options for | ||||
|      * details on its contents. The following is a basic permissive set of options: | ||||
|      */ | ||||
|     //httpStaticCors: { | ||||
|     //    origin: "*", | ||||
|     //    methods: "GET,PUT,POST,DELETE" | ||||
|     //}, | ||||
|  | ||||
|     /** The following property can be used to modify proxy options */ | ||||
|     // proxyOptions: { | ||||
|     //     mode: "legacy", // legacy mode is for non-strict previous proxy determination logic (node-red < v4 compatible) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user