Skip to content

Commit

Permalink
Add support for schemes in the specification
Browse files Browse the repository at this point in the history
This enables Lagun to understand when to use https. If `schemes` is not
present in the specification the protocol of the serving host will be
used.
  • Loading branch information
Joel Carlbark committed Oct 13, 2016
1 parent 3c0b772 commit fc47976
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 153 deletions.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
var param = location.search.substring(1);
var item = param.split("=");
var specUrl = item[0] == 'spec' ? decodeURIComponent(item[1]) : defaultSpecUrl;

var a = document.createElement('a');
a.href = specUrl;
var servingHost = a.protocol + '//' + a.hostname + (a.port ? ':' + a.port : '');
Elm.Main.fullscreen({
specUrl: specUrl,
servingHost: location.hostname+(location.port ? ':' + location.port : '')
servingHost: servingHost
});
</script>

Expand Down
Loading

0 comments on commit fc47976

Please sign in to comment.