Commit e4e0612
committed
fix: allow CORS from any loopback origin regardless of port
Previously isLoopbackOriginValue() only allowed origins on the same port
as the proxy (e.g. http://localhost:10100). This blocked browser apps
running on different localhost ports (e.g. CLIsu on :6001) from making
cross-origin requests to the proxy.
Now any http/https origin on localhost/127.0.0.1/::1 is treated as same-
trust-boundary and gets proper CORS headers with the request's origin
reflected back.1 parent a876f5b commit e4e0612
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1480 | 1480 | | |
1481 | 1481 | | |
1482 | 1482 | | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
| 1483 | + | |
| 1484 | + | |
1486 | 1485 | | |
1487 | 1486 | | |
1488 | 1487 | | |
| |||
1497 | 1496 | | |
1498 | 1497 | | |
1499 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1500 | 1509 | | |
1501 | 1510 | | |
1502 | 1511 | | |
1503 | | - | |
| 1512 | + | |
1504 | 1513 | | |
1505 | | - | |
| 1514 | + | |
1506 | 1515 | | |
1507 | 1516 | | |
1508 | 1517 | | |
| |||
0 commit comments