fix: CORS configuration option
This commit is contained in:
		
							parent
							
								
									a9b12d4bb9
								
							
						
					
					
						commit
						788466b640
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -8,7 +8,7 @@ var app = express(); | ||||||
| // enable CORS (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)
 | // enable CORS (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)
 | ||||||
| // so that your API is remotely testable by FCC 
 | // so that your API is remotely testable by FCC 
 | ||||||
| var cors = require('cors'); | var cors = require('cors'); | ||||||
| app.use(cors({optionSuccessStatus: 200}));  // some legacy browsers choke on 204
 | app.use(cors({optionsSuccessStatus: 200}));  // some legacy browsers choke on 204
 | ||||||
| 
 | 
 | ||||||
| // http://expressjs.com/en/starter/static-files.html
 | // http://expressjs.com/en/starter/static-files.html
 | ||||||
| app.use(express.static('public')); | app.use(express.static('public')); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue