The problem that I am fixing:
If this middleware is being used and a request is sent that does not contain any signaturecertchainurl then the container.js file sends back a 401 response. However, the method continues to process and will then attempt to send a second 401 response, which causes an unhandled exception.
The fix:
The fix is to add an "else" so that if the first part fails a check and sends a 401 it does not proceed with the second part of the method.
The problem that I am fixing: If this middleware is being used and a request is sent that does not contain any signaturecertchainurl then the container.js file sends back a 401 response. However, the method continues to process and will then attempt to send a second 401 response, which causes an unhandled exception.
The fix: The fix is to add an "else" so that if the first part fails a check and sends a 401 it does not proceed with the second part of the method.