Double key image cache by requesting origin, and store CORS status with cached images.

This commit is contained in:
Josh Matthews 2019-10-01 13:11:50 -04:00
parent ea46008288
commit 81a67aed9e
11 changed files with 132 additions and 57 deletions

View file

@ -8,7 +8,7 @@ use url::{Host, Origin};
use uuid::Uuid;
/// The origin of an URL
#[derive(Clone, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)]
#[derive(Clone, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)]
pub enum ImmutableOrigin {
/// A globally unique identifier
Opaque(OpaqueOrigin),
@ -82,7 +82,7 @@ impl ImmutableOrigin {
}
/// Opaque identifier for URLs that have file or other schemes
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct OpaqueOrigin(Uuid);
malloc_size_of_is_0!(OpaqueOrigin);