fix: login failure on U18 (#1983)
Reviewed-on: OpenWF/SpaceNinjaServer#1983 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									1914fd8f10
								
							
						
					
					
						commit
						238af294fe
					
				@ -21,6 +21,12 @@ app.use((req, _res, next) => {
 | 
				
			|||||||
    if (req.headers["content-encoding"] == "ezip" || req.headers["content-encoding"] == "e") {
 | 
					    if (req.headers["content-encoding"] == "ezip" || req.headers["content-encoding"] == "e") {
 | 
				
			||||||
        req.headers["content-encoding"] = undefined;
 | 
					        req.headers["content-encoding"] = undefined;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // U18 uses application/x-www-form-urlencoded even tho the data is JSON which Express doesn't like.
 | 
				
			||||||
 | 
					    if (req.headers["content-type"] == "application/x-www-form-urlencoded") {
 | 
				
			||||||
 | 
					        req.headers["content-type"] = "application/octet-stream";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    next();
 | 
					    next();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user