mirror of https://github.com/rwf2/Rocket.git
Fix forced HSTS logic in 'SpaceHelmet'.
This commit is contained in:
parent
59e27820e9
commit
af84f60bb8
|
@ -180,8 +180,10 @@ impl SpaceHelmet {
|
|||
response.set_header(policy.header());
|
||||
}
|
||||
|
||||
if !self.force_hsts.load(Ordering::Relaxed) {
|
||||
response.set_header(Policy::header(&Hsts::default()));
|
||||
if self.force_hsts.load(Ordering::Relaxed) {
|
||||
if !response.headers().contains(Hsts::NAME) {
|
||||
response.set_header(&Hsts::default());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue