-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to allow "root" Http configuration
- Loading branch information
1 parent
cb7a425
commit 02dbbc4
Showing
7 changed files
with
132 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 1 addition & 57 deletions
58
src/MTConnect.NET-HTTP/Configurations/IHttpAgentConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,15 @@ | ||
// Copyright (c) 2023 TrakHound Inc., All Rights Reserved. | ||
// TrakHound Inc. licenses this file to you under the MIT license. | ||
|
||
using MTConnect.Http; | ||
using System.Collections.Generic; | ||
|
||
namespace MTConnect.Configurations | ||
{ | ||
/// <summary> | ||
/// Configuration for an MTConnect Http Agent | ||
/// </summary> | ||
public interface IHttpAgentConfiguration : IAgentConfiguration | ||
public interface IHttpAgentConfiguration : IAgentConfiguration, IHttpServerConfiguration | ||
{ | ||
IEnumerable<HttpServerConfiguration> Http { get; } | ||
|
||
|
||
/// <summary> | ||
/// The port number the agent binds to for requests. | ||
/// </summary> | ||
int Port { get; } | ||
|
||
/// <summary> | ||
/// The server Hostname to bind to. Change this to the server's IP Address or hostname | ||
/// </summary> | ||
string Server { get; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the List of Encodings (ex. gzip, br, deflate) to pass to the Accept-Encoding HTTP Header | ||
/// </summary> | ||
IEnumerable<HttpResponseCompression> ResponseCompression { get; } | ||
|
||
/// <summary> | ||
/// Allow HTTP PUT or POST of data item values or assets. | ||
/// </summary> | ||
bool AllowPut { get; } | ||
|
||
/// <summary> | ||
/// Allow HTTP PUT or POST from a specific host or list of hosts. | ||
/// Lists are comma (,) separated and the host names will be validated by translating them into IP addresses. | ||
/// </summary> | ||
IEnumerable<string> AllowPutFrom { get; } | ||
|
||
/// <summary> | ||
/// The maximum number of Threads to use for the Http Stream Requests | ||
/// </summary> | ||
int MaxStreamingThreads { get; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the default response document indendation | ||
/// </summary> | ||
bool IndentOutput { get; } | ||
|
||
/// <summary> | ||
/// Gets or Sets the default response document comments output. Comments contain descriptions from the MTConnect standard | ||
/// </summary> | ||
bool OutputComments { get; } | ||
|
||
/// <summary> | ||
/// Gets or Sets the default response document validation level. 0 = Ignore, 1 = Warning, 2 = Strict | ||
/// </summary> | ||
OutputValidationLevel OutputValidationLevel { get; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the configuration for Static Files that can be served from the Http Server | ||
/// </summary> | ||
IEnumerable<FileConfiguration> Files { get; } | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
src/MTConnect.NET-HTTP/Configurations/IHttpServerConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using MTConnect.Http; | ||
using MTConnect.Tls; | ||
using System.Collections.Generic; | ||
|
||
namespace MTConnect.Configurations | ||
{ | ||
public interface IHttpServerConfiguration | ||
{ | ||
/// <summary> | ||
/// The port number the agent binds to for requests. | ||
/// </summary> | ||
int Port { get; set; } | ||
|
||
/// <summary> | ||
/// The server Hostname to bind to. Change this to the server's IP Address or hostname | ||
/// </summary> | ||
string Server { get; set; } | ||
|
||
TlsConfiguration Tls { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets the List of Encodings (ex. gzip, br, deflate) to pass to the Accept-Encoding HTTP Header | ||
/// </summary> | ||
IEnumerable<HttpResponseCompression> ResponseCompression { get; set; } | ||
|
||
/// <summary> | ||
/// Allow HTTP PUT or POST of data item values or assets. | ||
/// </summary> | ||
bool AllowPut { get; set; } | ||
|
||
/// <summary> | ||
/// Allow HTTP PUT or POST from a specific host or list of hosts. | ||
/// </summary> | ||
IEnumerable<string> AllowPutFrom { get; set; } | ||
|
||
/// <summary> | ||
/// The maximum number of Threads to use for the Http Stream Requests | ||
/// </summary> | ||
int MaxStreamingThreads { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the default response document indendation | ||
/// </summary> | ||
bool IndentOutput { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets the default response document comments output. Comments contain descriptions from the MTConnect standard | ||
/// </summary> | ||
bool OutputComments { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the default response document validation level. 0 = Ignore, 1 = Warning, 2 = Strict | ||
/// </summary> | ||
OutputValidationLevel OutputValidationLevel { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets the configuration for Static Files that can be served from the Http Server | ||
/// </summary> | ||
IEnumerable<FileConfiguration> Files { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters