From d2965df9f222da0eaa20f3b02cb82d7fd3cf507d Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Sat, 8 Jun 2019 10:33:53 +0100 Subject: [PATCH] Remove un-used RoutelessProxy Signed-off-by: Alex Ellis --- docker-compose.yml | 6 ++++-- gateway/server.go | 1 - gateway/types/handler_set.go | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 888bf6e9..6e6c46cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: gateway: ports: - 8080:8080 - image: openfaas/gateway:0.13.7-rc2 + image: openfaas/gateway:0.13.7-rc4 networks: - functions environment: @@ -43,11 +43,13 @@ services: # auth service provide basic-auth plugin for system APIs basic-auth-plugin: - image: openfaas/basic-auth-plugin:0.1.0 + image: openfaas/basic-auth-plugin:0.1.1 networks: - functions environment: secret_mount_path: "/run/secrets/" + user_filename: "basic-auth-user" + pass_filename: "basic-auth-password" deploy: placement: constraints: diff --git a/gateway/server.go b/gateway/server.go index 789bd6ca..6b3630fc 100644 --- a/gateway/server.go +++ b/gateway/server.go @@ -95,7 +95,6 @@ func main() { faasHandlers.Proxy = handlers.MakeForwardingProxyHandler(reverseProxy, functionNotifiers, functionURLResolver, functionURLTransformer, nil) - faasHandlers.RoutelessProxy = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector) faasHandlers.ListFunctions = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector) faasHandlers.DeployFunction = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector) faasHandlers.DeleteFunction = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector) diff --git a/gateway/types/handler_set.go b/gateway/types/handler_set.go index aec47889..2f01eb59 100644 --- a/gateway/types/handler_set.go +++ b/gateway/types/handler_set.go @@ -4,12 +4,14 @@ import "net/http" // HandlerSet can be initialized with handlers for binding to mux type HandlerSet struct { - Proxy http.HandlerFunc + // Proxy invokes functions upstream + Proxy http.HandlerFunc + DeployFunction http.HandlerFunc DeleteFunction http.HandlerFunc ListFunctions http.HandlerFunc Alert http.HandlerFunc - RoutelessProxy http.HandlerFunc + UpdateFunction http.HandlerFunc // QueryFunction - queries the metdata for a function