Adding User-Agent header

Some application return status 500 if User-Agent header is missing from HTTP request
This commit is contained in:
Alex Tzonkov 2023-09-21 22:21:09 -07:00 committed by GitHub
parent 6b8c02cf2a
commit a4e876a58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,8 @@ export default async function handler(req, res) {
try {
let startTime = performance.now();
let [status] = await httpProxy(pingURL, {
method: "HEAD"
method: "HEAD",
headers: {"User-Agent":"homepage"},
});
let endTime = performance.now();