Skip to content

Commit

Permalink
flowdisplay: show redirect location
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Nov 25, 2024
1 parent 344d80a commit 0c8a6a2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions webapp/static/js/flowdisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,17 @@ class FlowDisplay {
body.appendChild(cardEl)
this.updateAppFileinfoViews()
})

// Add extra HTTP redirection information if defined
if (appProto === 'http' || appProto === 'http2') {
const locationHeader = data.response_headers?.find(x => x?.name?.toLowerCase() === 'location')
if (locationHeader) {
const spanEl = document.createElement('p')
spanEl.classList.add('mt-1', 'mb-2', 'ms-3')
spanEl.textContent += `Redirection to ${locationHeader.value}`
body.appendChild(spanEl)
}
}
})
}

Expand Down

0 comments on commit 0c8a6a2

Please sign in to comment.