Commit 64eec9f
committed
fix(router): remove originAccessControlConfig for HTTP origins to prevent 502
When router.route() receives an http:// URL, the CloudFront Function
deletes customOriginConfig to inherit the placeholder's http-only
config. However, the remaining originAccessControlConfig: { enabled: false }
prevents CloudFront from correctly inheriting, causing it to default to
HTTPS:443 — which fails with 502 if the origin only listens on HTTP:80.
Fix: also delete originAccessControlConfig when protocol is "http".
The override.originAccessControlConfig check below still allows
OAC-enabled origins (protection: "oac") to re-add it explicitly.
Fixes #6742
Made-with: Cursor1 parent cc28fae commit 64eec9f
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2966 | 2966 | | |
2967 | 2967 | | |
2968 | 2968 | | |
| 2969 | + | |
2969 | 2970 | | |
2970 | 2971 | | |
2971 | 2972 | | |
| |||
0 commit comments