From 708d0c264794a96d7bb97b206b7ac4d8815faba4 Mon Sep 17 00:00:00 2001 From: joerivrij Date: Mon, 15 May 2023 09:02:30 +0200 Subject: [PATCH] Test to see were bug in TLS is coming from --- api/v1/resultaat.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/v1/resultaat.go b/api/v1/resultaat.go index 99b740b..e9736b0 100644 --- a/api/v1/resultaat.go +++ b/api/v1/resultaat.go @@ -6,6 +6,7 @@ import ( "github.com/VNG-Realisatie/referentielijsten-api/models" "github.com/VNG-Realisatie/referentielijsten-api/validator" "github.com/gorilla/mux" + "log" "net/http" "net/url" "strconv" @@ -55,6 +56,8 @@ func (r *ReferentielijstenHandler) ListResultaten(w http.ResponseWriter, req *ht scheme = "http://" } + log.Printf("req.TLS: %v", req.TLS) + pageId := req.URL.Query().Get(PageFromParam) procesType := req.URL.Query().Get(ProcesTypeFromParam) @@ -145,6 +148,11 @@ func (r *ReferentielijstenHandler) ListResultaten(w http.ResponseWriter, req *ht resultsToBeUsed := r.Data.Resultaten[start:finish] + log.Printf("scheme: %v", scheme) + log.Printf("req.Host: %v", req.Host) + log.Printf("req.URL.Path: %v", req.URL.Path) + log.Printf("req.Proto: %v", req.Proto) + for _, result := range resultsToBeUsed { u, _ := url.JoinPath(scheme, req.Host, req.URL.Path, result.URL) result.URL = u