Commit faecc33
fix: compare URLs without protocols with checkOrigin: lax-proto (#7865)
* Remove standard CSRF middleware for lax-proto
Previously, two CSRF middlewares were added for lax-proto requests: one
at the beginning and one at the end. This change replaces them with a
single middleware placed at the beginning. Non-lax-proto cases remain
unchanged.
* Fix CSRF check for lax-proto match origin and inputOrigin after removing
protocol when checkOrigin is lax-proto
* fix: replace http(s) only at the beginning
* Update .changeset/curvy-glasses-wash.md
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
---------
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>1 parent ea22cc2 commit faecc33
File tree
2 files changed
+9
-5
lines changed- .changeset
- packages/qwik-city/src/middleware/request-handler
2 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | 69 | | |
72 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
| 453 | + | |
455 | 454 | | |
456 | 455 | | |
457 | 456 | | |
| |||
0 commit comments