Skip to content

Commit

Permalink
Support non-HTTPS metadata download. Fixes italia#280
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Jun 3, 2024
1 parent 61aa66e commit 6076e36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spid-validator/server/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ class Utils {
}

// check if URL exists
https.get(src, (res) => {
var q = url.parse(src, true);
var protocol = (q.protocol == "http:") ? require('http') : require('https');
protocol.get(src, (res) => {
if(res.statusCode!='200') {
return reject("Metadata non trovato alla URL indicata");
}
Expand Down

0 comments on commit 6076e36

Please sign in to comment.