trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

HTTP_NO_CACHE never-cache scheme http only

Open mat1010 opened this issue 3 years ago • 0 comments

This Bug Report affects these Traffic Control components:

  • Traffic Control Cache Config (t3c, formerly ORT)

Current behavior:

When selecting HTTP_NO_CACHE as DS type and having an https origin the cache.config is still generated with scheme=http this results in the scenario that requests are cached since the scheme has to be https

Expected behavior:

The scheme used to access the origin should be reflected within cache.config

Steps to reproduce:

  • TC version: 6.1.0
  • Create a service with HTTP_NO_CACHE
  • use https://example.org as origin
  • check the cache.config which still contains dest_domain=example.org scheme=http action=never-cache

Following parts in the code should cause this behaviour https://github.com/apache/trafficcontrol/blob/77d88c387aa8398bec5858434644b9f92bb65dfc/lib/go-atscfg/servercachedotconfig.go#L78 https://github.com/apache/trafficcontrol/blob/77d88c387aa8398bec5858434644b9f92bb65dfc/lib/go-atscfg/servercachedotconfig.go#L80

https://github.com/apache/trafficcontrol/blob/77d88c387aa8398bec5858434644b9f92bb65dfc/lib/go-atscfg/cachedotconfig.go#L139 https://github.com/apache/trafficcontrol/blob/77d88c387aa8398bec5858434644b9f92bb65dfc/lib/go-atscfg/cachedotconfig.go#L142

mat1010 avatar May 18 '22 19:05 mat1010