Skip to content

Commit

Permalink
Test to see were bug in TLS is coming from
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivrij committed May 15, 2023
1 parent 95f49b7 commit 708d0c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/v1/resultaat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 708d0c2

Please sign in to comment.