Add support for Host matching in HTTP triggers (#425)
Include Host in httptrigger output table and fix duplicate error detection to consider Host as well.
This commit is contained in:
committed by
Soam Vasani
parent
dff34b08e9
commit
be84a864fb
@@ -116,7 +116,12 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
|
||||
function: rr.functionMetadata,
|
||||
executor: ts.executor,
|
||||
}
|
||||
muxRouter.HandleFunc(trigger.Spec.RelativeURL, fh.handler).Methods(trigger.Spec.Method)
|
||||
|
||||
ht := muxRouter.HandleFunc(trigger.Spec.RelativeURL, fh.handler)
|
||||
ht.Methods(trigger.Spec.Method)
|
||||
if trigger.Spec.Host != "" {
|
||||
ht.Host(trigger.Spec.Host)
|
||||
}
|
||||
if trigger.Spec.RelativeURL == "/" && trigger.Spec.Method == "GET" {
|
||||
homeHandled = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user