diff options
Diffstat (limited to 'hosted/access.html')
-rw-r--r-- | hosted/access.html | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/hosted/access.html b/hosted/access.html index 119ac80..11e1fe5 100644 --- a/hosted/access.html +++ b/hosted/access.html @@ -42,7 +42,9 @@ Access to the challenge containers is provided via OpenVPN. <hr> <button class="btn btn-secondary" onclick="loadConfig()">Reload</button> - <button class="btn btn-primary" onclick="downloadConfig()">Download</button> + <a href="/api/getAccess?download=true"> + <button class="btn btn-primary">Download</button> + </a> <hr> <pre><code id="config">Loading...</code></pre> </div> @@ -58,14 +60,6 @@ }); } - function downloadConfig() { - $.get("/api/getAccess").done(function(data) { - var result = jQuery.parseJSON(data); - var configBlob = new Blob([result["credentials"]], {'type':'application/x-openvpn-config'}); - window.location = URL.createObjectURL(configBlob); - }); - } - $(document).ready( function(){ loadConfig() |