mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	Replace csurf with csrf-sync
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/middleware/csrf.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/middleware/csrf.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| const { csrfSync } = require('csrf-sync'); | ||||
|  | ||||
| const { | ||||
| 	generateToken, | ||||
| 	csrfSynchronisedProtection, | ||||
| } = csrfSync({ | ||||
| 	size: 64 | ||||
| }); | ||||
|  | ||||
| module.exports = { | ||||
| 	generateToken, | ||||
| 	csrfSynchronisedProtection, | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user