Skip to content

Commit

Permalink
Merge pull request #281 from alranel/issue280-http-metadata
Browse files Browse the repository at this point in the history
Support dowloading SP metadata from non-HTTPS servers
  • Loading branch information
damikael authored Jun 3, 2024
2 parents 61aa66e + 6076e36 commit b53ba4e
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 b53ba4e

Please sign in to comment.