mirror of
https://github.com/kou029w/websri.git
synced 2025-01-18 08:05:13 +00:00
accepts options
This commit is contained in:
parent
9b64464d81
commit
ddcb93da0c
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ export function getPrioritizedHashAlgorithm(
|
|||
}
|
||||
|
||||
export const IntegrityMetadataRegex =
|
||||
/^(?<alg>sha256|sha384|sha512)-(?<val>(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?<opts>[\x21-\x7e]*))?$/;
|
||||
/^(?<alg>sha256|sha384|sha512)-(?<val>(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?<opt>[\x21-\x7e]*))?$/;
|
||||
|
||||
export const SeparatorRegex = /[^\x21-\x7e]+/;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ test("supports SHA-512", function () {
|
|||
});
|
||||
});
|
||||
|
||||
test.todo("accepts options", function () {
|
||||
test("accepts options", function () {
|
||||
const integrityMetadata = new IntegrityMetadata(
|
||||
"sha256-MV9b23bQeMQ7isAGTkoBZGErH853yGk0W/yUx1iU7dM=?foo?bar",
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue