Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Front Door - Origin Header - Case Sensitivity #1082

Open
kek-Sec opened this issue Jul 4, 2024 · 0 comments
Open

Azure Front Door - Origin Header - Case Sensitivity #1082

kek-Sec opened this issue Jul 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kek-Sec
Copy link

kek-Sec commented Jul 4, 2024

Report

When the origin-header is for example: foo.Bar.com , instead of foo.bar.com in Azure Front Door (probably any other CDN aswell) you get the following exception:

2024-07-04T08:54:28Z    ERROR   LoggingMiddleware.RoutingMiddleware.StaticHandler       Not Found       {"routingKey": "//foo.Bar.com", "namespacedNameError": "PANIC=value method k8s.io/apimachinery/pkg/types.NamespacedName.MarshalLog called using nil *NamespacedName pointer", "stream": "<nil>"}
github.com/kedacore/http-add-on/interceptor/handler.(*Static).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/handler/static.go:36
github.com/kedacore/http-add-on/interceptor/middleware.(*Routing).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/routing.go:49
github.com/kedacore/http-add-on/interceptor/middleware.(*Logging).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/logging.go:42
github.com/kedacore/http-add-on/interceptor/middleware.(*Metrics).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/metrics.go:24
net/http.serverHandler.ServeHTTP
        net/http/server.go:3137
net/http.(*conn).serve
        net/http/server.go:2039

Expected Behavior

Request should be routed in a case insensitive way since domains are not case sensitive

Actual Behavior

Request route is case sensitive

Steps to Reproduce the Problem

  1. Create an nginx ingress with httpscaleobject for foo.bar.com
  2. Attempt to access the domain via foo.Bar.com (or set origin headers to foo.Bar.com)
  3. 404 not found with error in proxy

Logs from KEDA HTTP operator

2024-07-04T08:32:31Z    ERROR   LoggingMiddleware.RoutingMiddleware.StaticHandler       Not Found       {"routingKey": "//foo.Bar.com/health/", "namespacedNameError": "PANIC=value method k8s.io/apimachinery/pkg/types.NamespacedName.MarshalLog called using nil *NamespacedName pointer", "stream": "<nil>"}
github.com/kedacore/http-add-on/interceptor/handler.(*Static).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/handler/static.go:36
github.com/kedacore/http-add-on/interceptor/middleware.(*Routing).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/routing.go:49
github.com/kedacore/http-add-on/interceptor/middleware.(*Logging).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/logging.go:42
github.com/kedacore/http-add-on/interceptor/middleware.(*Metrics).ServeHTTP
        github.com/kedacore/http-add-on/interceptor/middleware/metrics.go:24
net/http.serverHandler.ServeHTTP
        net/http/server.go:3137
net/http.(*conn).serve
        net/http/server.go:2039

HTTP Add-on Version

0.8.0

Kubernetes Version

1.29

Platform

Microsoft Azure

Anything else?

No response

@kek-Sec kek-Sec added the bug Something isn't working label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

1 participant