Skip to content

Commit 45e047c

Browse files
Merge pull request #1748 from yoshisatoyanagisawa/requestmethod
Check requestMethod
2 parents 522a17c + 2f58e56 commit 45e047c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/index.bs

+6-1
Original file line numberDiff line numberDiff line change
@@ -3383,7 +3383,11 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
33833383
Note: Since running a user-defined regular expression has a security concern, it is prohibited.
33843384

33853385
1. Set |hasCondition| to true.
3386-
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=], set |hasCondition| to true.
3386+
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=]:
3387+
1. Let |method| be |condition|["{{RouterCondition/requestMethod}}"].
3388+
1. If |method| is not a [=/method=], then return false.
3389+
1. If |method| is a [=forbidden method=], then return false.
3390+
1. Set |hasCondition| to true.
33873391
1. If |condition|["{{RouterCondition/requestMode}}"] [=map/exists=], set |hasCondition| to true.
33883392
1. If |condition|["{{RouterCondition/requestDestination}}"] [=map/exists=], set |hasCondition| to true.
33893393
1. If |condition|["{{RouterCondition/runningStatus}}"] [=map/exists=], set |hasCondition| to true.
@@ -3435,6 +3439,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
34353439
1. If running [=match=] with |pattern| and |request|'s [=request/URL=] returns null, return false.
34363440
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=], then:
34373441
1. Let |method| be |condition|["{{RouterCondition/requestMethod}}"].
3442+
1. [=method/Normalize=] |method|.
34383443
1. If |request|'s [=request/method=] is not |method|, return false.
34393444
1. If |condition|["{{RouterCondition/requestMode}}"] [=map/exists=], then:
34403445
1. Let |mode| be |condition|["{{RouterCondition/requestMode}}"].

0 commit comments

Comments
 (0)