Commit b86dd87
committed
fix(build): monkey-patch fetch during build to absorb Strapi HTML responses
Cloudflare in front of staging-strapi.keepsimple.io has started returning
HTML challenge pages to GitHub Actions runner IPs. This crashed every
getStaticProps/getStaticPaths that JSON.parses the response. Patch only
fires when NEXT_PHASE=phase-production-build so runtime fetches inside the
running container (which reach Strapi cleanly) are unaffected. Pages with
fallback: blocking will SSG on-demand on first request.1 parent d350403 commit b86dd87
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
1 | 28 | | |
2 | 29 | | |
3 | 30 | | |
| |||
0 commit comments