Skip to content

Commit ed76888

Browse files
authored
Merge pull request #3361 from embik/disable-localproxy
🐛 Do not set up local mini-front-proxy without additional mappings file
2 parents 7d3eb1f + e855028 commit ed76888

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/server/localproxy.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ func WithLocalProxy(
202202
handler.ServeHTTP(w, req.WithContext(ctx))
203203
})
204204

205+
// if no additional mappings are provided, do not start local-only mini-front-proxy.
206+
if additionalMappingsFile == "" {
207+
return defaultHandlerFunc, nil
208+
}
209+
205210
// If additional mappings file is provided, read it and add the mappings to the handler
206211
handlers, err := NewLocalProxyHandler(defaultHandlerFunc, indexState, additionalMappingsFile)
207212
if err != nil {

0 commit comments

Comments
 (0)