Commit a1e96502 authored by Matthew Gall's avatar Matthew Gall

Added User-Agent support, and updated mirrors.json

parent e4343040
......@@ -4,7 +4,7 @@
"user-agent": "mirrors.wales/mirrorbot (debian)"
},
"piwheels": {
"endpoint": "https://mirrors.hostedin.wales/piwheels",
"endpoint": "http://mirrors.hostedin.wales/piwheels",
"user-agent": "mirrors.wales/mirrorbot (piwheels)"
},
"ubuntu": {
......
......@@ -66,6 +66,9 @@ async function handleRequest(request) {
path += '/'
return fetch(`${endpoint}${path}`, {
headers: {
'User-Agent': config[product]['user-agent']
},
cf: {
cacheTtlByStatus: {
"200-299": 86400,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment