Skip to content

Commit

Permalink
Add the host header to the set of forbidden headers
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Feb 9, 2024
1 parent 83cf743 commit f281f15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/wasi-http/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub trait WasiHttpView: Send {

/// Returns `true` when the header is forbidden according to this [`WasiHttpView`] implementation.
pub(crate) fn is_forbidden_header(view: &mut dyn WasiHttpView, name: &HeaderName) -> bool {
static FORBIDDEN_HEADERS: [HeaderName; 9] = [
static FORBIDDEN_HEADERS: [HeaderName; 10] = [
hyper::header::CONNECTION,
HeaderName::from_static("keep-alive"),
hyper::header::PROXY_AUTHENTICATE,
Expand All @@ -86,6 +86,7 @@ pub(crate) fn is_forbidden_header(view: &mut dyn WasiHttpView, name: &HeaderName
hyper::header::TE,
hyper::header::TRANSFER_ENCODING,
hyper::header::UPGRADE,
hyper::header::HOST,
HeaderName::from_static("http2-settings"),
];

Expand Down

0 comments on commit f281f15

Please sign in to comment.