mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Adds control message for HSTS headers
This commit is contained in:
parent
f284181781
commit
795454fb81
2 changed files with 9 additions and 0 deletions
|
@ -366,6 +366,13 @@ impl ResourceChannelManager {
|
|||
ControlMsg::GetCookiesForUrl(url, consumer, source) => {
|
||||
consumer.send(self.resource_manager.cookie_storage.cookies_for_url(&url, source)).unwrap();
|
||||
}
|
||||
ControlMsg::SetHSTSEntryForHost(host, include_subdomains, max_age) => {
|
||||
match HSTSEntry::new(host, include_subdomains, max_age) {
|
||||
Some(entry) => self.resource_manager.add_hsts_entry(entry),
|
||||
/// Invalid entries (e.g. IP's don't matter)
|
||||
None => ()
|
||||
}
|
||||
}
|
||||
ControlMsg::Exit => {
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue