mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-07-02 17:37:37 +00:00
feat(config): add HTTP2 field to ServerInstanceConfig and align with server.Config
This commit is contained in:
@@ -50,6 +50,10 @@ type ServerInstanceConfig struct {
|
|||||||
// GZIP enables GZIP compression middleware
|
// GZIP enables GZIP compression middleware
|
||||||
GZIP bool `mapstructure:"gzip"`
|
GZIP bool `mapstructure:"gzip"`
|
||||||
|
|
||||||
|
// HTTP2 enables HTTP/2 with the Extended CONNECT protocol (RFC 8441) for WebSocket support.
|
||||||
|
// Requires TLS; pair with SSLCert/SSLKey, SelfSignedSSL, or AutoTLS.
|
||||||
|
HTTP2 bool `mapstructure:"http2"`
|
||||||
|
|
||||||
// TLS/HTTPS configuration options (mutually exclusive)
|
// TLS/HTTPS configuration options (mutually exclusive)
|
||||||
// Option 1: Provide certificate and key files directly
|
// Option 1: Provide certificate and key files directly
|
||||||
SSLCert string `mapstructure:"ssl_cert"`
|
SSLCert string `mapstructure:"ssl_cert"`
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ func FromConfigInstanceToServerConfig(sic *config.ServerInstanceConfig, handler
|
|||||||
Description: sic.Description,
|
Description: sic.Description,
|
||||||
Handler: handler,
|
Handler: handler,
|
||||||
GZIP: sic.GZIP,
|
GZIP: sic.GZIP,
|
||||||
|
HTTP2: sic.HTTP2,
|
||||||
|
|
||||||
SSLCert: sic.SSLCert,
|
SSLCert: sic.SSLCert,
|
||||||
SSLKey: sic.SSLKey,
|
SSLKey: sic.SSLKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user