Add date to header in windows

This commit is contained in:
Marvin Martinson 2021-09-07 11:43:44 +00:00
parent d8d5b5f6bc
commit 5fcedc0fe9
2 changed files with 5 additions and 2 deletions

View File

@ -361,7 +361,9 @@ function onToggleAccessButtonClicked(e) {
var value = $(e.target).attr("data-value") == 'True'; var value = $(e.target).attr("data-value") == 'True';
var confirm = window.confirm("Do you want to disable " + cn); var textValues = {false:"Disable",true:"Enable"}
var confirm = window.confirm("Do you want to " + textValues[value] +" "+ cn);
if (confirm) { if (confirm) {
$.ajax({ $.ajax({
@ -943,4 +945,4 @@ window.onSubmitRequest = onSubmitRequest;
window.onServerStarted = onServerStarted; window.onServerStarted = onServerStarted;
window.onServerStopped = onServerStopped; window.onServerStopped = onServerStopped;
window.onIssueToken = onIssueToken; window.onIssueToken = onIssueToken;
window.onInstanceAvailabilityUpdated = onInstanceAvailabilityUpdated; window.onInstanceAvailabilityUpdated = onInstanceAvailabilityUpdated;

View File

@ -22,6 +22,7 @@ Invoke-WebRequest `{% if token %}
-Method PUT `{% else %} -Method PUT `{% else %}
-Uri 'https://{{ authority.namespace }}:8443/api/request/?wait=yes&autosign=yes' ` -Uri 'https://{{ authority.namespace }}:8443/api/request/?wait=yes&autosign=yes' `
-Method POST `{% endif %} -Method POST `{% endif %}
-Headers @{'Date' = (Get-Date).ToUniversalTime().ToString("r")} `
-TimeoutSec 900 ` -TimeoutSec 900 `
-InFile host_csr.pem ` -InFile host_csr.pem `
-ContentType application/pkcs10 ` -ContentType application/pkcs10 `