🐛 fix test client
This commit is contained in:
		
							parent
							
								
									b2665a0a54
								
							
						
					
					
						commit
						babb5364a5
					
				
							
								
								
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -18,7 +18,7 @@ | ||||
| 				"express": "^4.17.1", | ||||
| 				"express-validator": "^6.9.2", | ||||
| 				"i18next": "^19.8.5", | ||||
| 				"i18next-http-middleware": "^3.1.0", | ||||
| 				"i18next-http-middleware": "^3.1.1", | ||||
| 				"i18next-node-fs-backend": "^2.1.3", | ||||
| 				"jsonwebtoken": "^8.5.1", | ||||
| 				"lambert-server": "^1.2.1", | ||||
| @ -5076,9 +5076,9 @@ | ||||
| 			} | ||||
| 		}, | ||||
| 		"node_modules/i18next-http-middleware": { | ||||
| 			"version": "3.1.0", | ||||
| 			"resolved": "https://registry.npmjs.org/i18next-http-middleware/-/i18next-http-middleware-3.1.0.tgz", | ||||
| 			"integrity": "sha512-65rP8bi5b7znBzfgIUy0KE00SWg1X6mL5XEkassgTrjAeLSfSb4vQ2bs9cN3qwHCynKIpmHjmNDu5c8NylTVmw==" | ||||
| 			"version": "3.1.1", | ||||
| 			"resolved": "https://registry.npmjs.org/i18next-http-middleware/-/i18next-http-middleware-3.1.1.tgz", | ||||
| 			"integrity": "sha512-MKS2+iac5qO/95tvlpOGDtqWOqp4bOEBHLoqZNS6wQBO7fu/rd2G7IO3R+Vq0xahXkH/Jh/UoG+vHSko2VitYw==" | ||||
| 		}, | ||||
| 		"node_modules/i18next-node-fs-backend": { | ||||
| 			"version": "2.1.3", | ||||
| @ -16570,9 +16570,9 @@ | ||||
| 			} | ||||
| 		}, | ||||
| 		"i18next-http-middleware": { | ||||
| 			"version": "3.1.0", | ||||
| 			"resolved": "https://registry.npmjs.org/i18next-http-middleware/-/i18next-http-middleware-3.1.0.tgz", | ||||
| 			"integrity": "sha512-65rP8bi5b7znBzfgIUy0KE00SWg1X6mL5XEkassgTrjAeLSfSb4vQ2bs9cN3qwHCynKIpmHjmNDu5c8NylTVmw==" | ||||
| 			"version": "3.1.1", | ||||
| 			"resolved": "https://registry.npmjs.org/i18next-http-middleware/-/i18next-http-middleware-3.1.1.tgz", | ||||
| 			"integrity": "sha512-MKS2+iac5qO/95tvlpOGDtqWOqp4bOEBHLoqZNS6wQBO7fu/rd2G7IO3R+Vq0xahXkH/Jh/UoG+vHSko2VitYw==" | ||||
| 		}, | ||||
| 		"i18next-node-fs-backend": { | ||||
| 			"version": "2.1.3", | ||||
|  | ||||
| @ -39,7 +39,7 @@ | ||||
| 		"express": "^4.17.1", | ||||
| 		"express-validator": "^6.9.2", | ||||
| 		"i18next": "^19.8.5", | ||||
| 		"i18next-http-middleware": "^3.1.0", | ||||
| 		"i18next-http-middleware": "^3.1.1", | ||||
| 		"i18next-node-fs-backend": "^2.1.3", | ||||
| 		"jsonwebtoken": "^8.5.1", | ||||
| 		"lambert-server": "^1.2.1", | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| diff --git a/node_modules/i18next-http-middleware/cjs/httpFunctions.js b/node_modules/i18next-http-middleware/cjs/httpFunctions.js
 | ||||
| index 47f0d61..ed0af1b 100644
 | ||||
| index 47f0d61..c1ebebc 100644
 | ||||
| --- a/node_modules/i18next-http-middleware/cjs/httpFunctions.js
 | ||||
| +++ b/node_modules/i18next-http-middleware/cjs/httpFunctions.js
 | ||||
| @@ -1,175 +1,181 @@
 | ||||
| @ -271,3 +271,4 @@ index 47f0d61..ed0af1b 100644 | ||||
|  }; | ||||
|   | ||||
|  exports.extendOptionsWithDefaults = extendOptionsWithDefaults; | ||||
| \ No newline at end of file | ||||
| @ -4,9 +4,10 @@ import { NextFunction, Request, Response } from "express"; | ||||
| 
 | ||||
| export function CORS(req: Request, res: Response, next: NextFunction) { | ||||
| 	res.set("Access-Control-Allow-Origin", "*"); | ||||
| 	// TODO: use securer CSP policy
 | ||||
| 	res.set( | ||||
| 		"Content-security-policy", | ||||
| 		"script-src 'https://hcaptcha.com, https://*.hcaptcha.com' frame-src 'https://hcaptcha.com, https://*.hcaptcha.com' style-src 'https://hcaptcha.com, https://*.hcaptcha.com' connect-src 'https://hcaptcha.com, https://*.hcaptcha.com'" | ||||
| 		"default-src *  data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';" | ||||
| 	); | ||||
| 	res.set("Access-Control-Allow-Headers", req.header("Access-Control-Request-Headers")); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Flam3rboy
						Flam3rboy