My http.Redirect is as below:
http.Redirect(iWri, pRq, "/report/"+UD.TID+"/_report/last_report.html", http.StatusFound)
Here UD.TID = 2022066A4KIFTXUUP2WQO7, or something like that, but my Router code is like below:
oRouter.PathPrefix(
"/report/{id:[0-9]{6}[A-Za-z2-7=]{16}}/{path:.*}",
).Methods("GET").Handler(
mwBaseCompressed.ThenFunc(apiParam.ReportServerHandler()),
)
My folder structure where the last_report.html is stored is as below:
"/Users/myname/projbuild/prod/project_v2/_var/QCACHE/2022/06/6A4KIFTXUUP2WQO7/_report/last_report.html"
The above combination is working fine when we run frontend (vue) and backend (go) on local or dev server, means the string 2022066A4KIFTXUUP2WQO7 somehow get split into 2022/06/6A4KIFTXUUP2WQO7 and report get displayed.
BUT on the production server we are using Nginx server and nginx conf is s below for /report,
location /report/ { alias /home/admin/_var/QCACHE/; }
with Nginx the string 2022066A4KIFTXUUP2WQO7 doesn't get split and remains same so application can't show report.
Same is working fine with haproxy.