alex (he/him)
alex (he/him)
Explore posts from servers
CDCloudflare Developers
Created by alex (he/him) on 11/14/2023 in #pages-help
Help understanding routing with a custom `_routes.json`
Hey I'm debugging an user bug report for Astro. The user has the following _routes.json
{
"version": 1,
"include": [
"/404",
"/_image"
],
"exclude": []
}
{
"version": 1,
"include": [
"/404",
"/_image"
],
"exclude": []
}
And the following file-tree:
dist
├── _redirects
├── _routes.json
├── _worker.js
├── favicon.svg
└── index.html
dist
├── _redirects
├── _routes.json
├── _worker.js
├── favicon.svg
└── index.html
If he now tries to access his webpage using the following url: https://example.com/unknown, the index.html is returned. Would like to understand the why, so we can offer a fix in Astro?
12 replies
CDCloudflare Developers
Created by alex (he/him) on 10/20/2023 in #pages-help
`pages.dev` is limited compared to custom domain
We have enabled CF Fonts & CF Image Resizing on a zone, which also is setup as a custom domain for our pages project. That works fine for the main production branch. However accessing the preview deployments at hash.pages.dev, both system do not work. What is the best way to make them work with the pages.dev urls, or get individual preview urls on the custom domain automatically?
6 replies
CDCloudflare Developers
Created by alex (he/him) on 7/3/2023 in #pages-help
`rss.xml` Error 1101
trying to access: https://baae285e.test-ef9.pages.dev/rss.xml But get strange issue, can someone help?
{
"outcome": "exception",
"scriptName": "pages-worker--1063707-production",
"exceptions": [
{
"name": "Error",
"message": "internal error",
"timestamp": 1688404914662
}
],
"logs": [],
"eventTimestamp": 1688404914662,
"event": {
"request": {
"url": "https://baae285e.test-ef9.pages.dev/rss.xml",
"method": "GET",
"headers": {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-encoding": "gzip",
"accept-language": "en-US,en;q=0.9,de;q=0.8",
"cache-control": "max-age=0",
"cf-connecting-ip": "31.17.112.38",
"cf-ipcountry": "DE",
"cf-ray": "7e10cebc98ffcad1",
"cf-visitor": "{\"scheme\":\"https\"}",
"connection": "Keep-Alive",
"dnt": "1",
"host": "baae285e.test-ef9.pages.dev",
"priority": "u=0, i",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "none",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"x-forwarded-proto": "https",
"x-real-ip": "31.17.112.38"
},
},
"response": {
"status": 500
}
},
"id": 2
}
{
"outcome": "exception",
"scriptName": "pages-worker--1063707-production",
"exceptions": [
{
"name": "Error",
"message": "internal error",
"timestamp": 1688404914662
}
],
"logs": [],
"eventTimestamp": 1688404914662,
"event": {
"request": {
"url": "https://baae285e.test-ef9.pages.dev/rss.xml",
"method": "GET",
"headers": {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-encoding": "gzip",
"accept-language": "en-US,en;q=0.9,de;q=0.8",
"cache-control": "max-age=0",
"cf-connecting-ip": "31.17.112.38",
"cf-ipcountry": "DE",
"cf-ray": "7e10cebc98ffcad1",
"cf-visitor": "{\"scheme\":\"https\"}",
"connection": "Keep-Alive",
"dnt": "1",
"host": "baae285e.test-ef9.pages.dev",
"priority": "u=0, i",
"sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "none",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"x-forwarded-proto": "https",
"x-real-ip": "31.17.112.38"
},
},
"response": {
"status": 500
}
},
"id": 2
}
7 replies