Commit a1e96502 authored by Matthew Gall's avatar Matthew Gall

Added User-Agent support, and updated mirrors.json

parent e4343040
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"user-agent": "mirrors.wales/mirrorbot (debian)" "user-agent": "mirrors.wales/mirrorbot (debian)"
}, },
"piwheels": { "piwheels": {
"endpoint": "https://mirrors.hostedin.wales/piwheels", "endpoint": "http://mirrors.hostedin.wales/piwheels",
"user-agent": "mirrors.wales/mirrorbot (piwheels)" "user-agent": "mirrors.wales/mirrorbot (piwheels)"
}, },
"ubuntu": { "ubuntu": {
......
...@@ -66,6 +66,9 @@ async function handleRequest(request) { ...@@ -66,6 +66,9 @@ async function handleRequest(request) {
path += '/' path += '/'
return fetch(`${endpoint}${path}`, { return fetch(`${endpoint}${path}`, {
headers: {
'User-Agent': config[product]['user-agent']
},
cf: { cf: {
cacheTtlByStatus: { cacheTtlByStatus: {
"200-299": 86400, "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