File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
packages/clients/src/api/lb/v1 Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ const unmarshalRouteMatch = (data: unknown) => {
463463 )
464464 }
465465
466- return { sni : data . sni } as RouteMatch
466+ return { hostHeader : data . host_header , sni : data . sni } as RouteMatch
467467}
468468
469469export const unmarshalAcl = ( data : unknown ) => {
@@ -903,7 +903,16 @@ const marshalRouteMatch = (
903903 request : RouteMatch ,
904904 defaults : DefaultValues ,
905905) : Record < string , unknown > => ( {
906- sni : request . sni ,
906+ ...resolveOneOf ( [
907+ {
908+ param : 'sni' ,
909+ value : request . sni ,
910+ } ,
911+ {
912+ param : 'host_header' ,
913+ value : request . hostHeader ,
914+ } ,
915+ ] ) ,
907916} )
908917
909918const marshalSubscriberEmailConfig = (
Original file line number Diff line number Diff line change @@ -728,9 +728,18 @@ export interface Route {
728728export interface RouteMatch {
729729 /**
730730 * Server Name Indication TLS extension (SNI) field from an incoming
731- * connection made via an SSL/TLS transport layer
731+ * connection made via an SSL/TLS transport layer.
732+ *
733+ * One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set.
732734 */
733735 sni ?: string
736+ /**
737+ * The Host request header specifies the host of the server to which the
738+ * request is being sent.
739+ *
740+ * One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set.
741+ */
742+ hostHeader ?: string
734743}
735744
736745/** Set acls response */
You can’t perform that action at this time.
0 commit comments