work with empty header

This commit is contained in:
Tommy Parnell
2016-04-27 11:10:55 -04:00
parent f5a290d2d7
commit 3eb0b820c1
3 changed files with 10 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
"Endpoints": [ "Endpoints": [
{ {
"port": 80, "port": 80,
"DnsName": "mywebsite.com", "DnsName": "",
"Secure": false "Secure": false
} }
] ]

View File

@@ -29,13 +29,17 @@ namespace QuikPak
foreach(var Endpoint in config.Endpoints) foreach(var Endpoint in config.Endpoints)
{ {
addresses.Add(new WebSite.WebAddress() { var attr = new Attributes()
Attributes = new Attributes()
{ {
{ "Port", Endpoint.Port }, { "Port", Endpoint.Port },
{"Header", Endpoint.DnsName },
{ "Secure", Endpoint.Secure? "yes": "no" } { "Secure", Endpoint.Secure? "yes": "no" }
} };
if(!string.IsNullOrWhiteSpace(Endpoint.DnsName))
{
attr["Header"] = Endpoint.DnsName;
}
addresses.Add(new WebSite.WebAddress() {
}); });
} }

View File

@@ -5,7 +5,7 @@
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages --> <!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>quikpak</id> <id>quikpak</id>
<title>QuikPak (Install)</title> <title>QuikPak (Install)</title>
<version>0.2.0</version> <version>0.3.0</version>
<authors>Tommy Parnell</authors> <authors>Tommy Parnell</authors>
<owners>Tommy Parnell</owners> <owners>Tommy Parnell</owners>
<summary>quickly pack directory's as IIS websites</summary> <summary>quickly pack directory's as IIS websites</summary>