mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
server onRequest handler no longer requires a socket in the request (#9332)
Per #9302 A request sent through a HapiJS .inject() doesn't have a socket associated with the request, which causes a failure.
This commit is contained in:
parent
b20f996601
commit
10c2136010
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ export default function (kbnServer, server, config) {
|
|||
});
|
||||
|
||||
server.ext('onRequest', function (req, reply) {
|
||||
if (req.raw.req.socket.encrypted) {
|
||||
// A request sent through a HapiJS .inject() doesn't have a socket associated with the request
|
||||
// which causes a failure.
|
||||
if (!req.raw.req.socket || req.raw.req.socket.encrypted) {
|
||||
reply.continue();
|
||||
} else {
|
||||
reply.redirect(formatUrl({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue