Require CORS Origin header to use https:// and match the entire hostname.

Also require the port number to match if specified in the accepted origins
list.
This commit is contained in:
Wesley Miaw
2020-03-27 15:45:23 -07:00
parent e7ccaec8ae
commit df63f0e6af
4 changed files with 80 additions and 49 deletions

View File

@@ -17,7 +17,7 @@ and open the template in the editor.
console.log("make dial post...");
var ip = $("#ipAddress").val();
var port = $("#dialPort").val();
var urlStr = "http://"+ip+":"+port+"/apps/"+app;
var urlStr = "https://"+ip+":"+port+"/apps/"+app;
console.log(urlStr);
$("#status").text("posted to "+urlStr);
$.ajax({