Limesurvey: Redirection on wrong port

135 Views Asked by At

I'm currently working on setting up a LimeSurvey (version 5.1.17) inside a Kubernetes cluster. When trying to access the /admin/ endpoint it works perfectly, but if I try to reach /admin endpoint, I get a 301 moved redirect to http://<URL>:8080/admin, which is the port pods are listening to.

I have tried modifying the .htaccess file to rewrite the url from /admin to /admin/ but it didn't do anything, I can't even set a 403 on /admin, it will redirect me in any case. I also searched across the code but I couldn't find where was the problem. It might come from Traefik but it doesn't look like it's modifying urls.

Thanks for your help.

EDIT: I tried to add a traefik redirectRegex rule:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: replacement-middleware
spec:
  redirectRegex:
    regex: "(http:\\/\\/[^\\/]+\\/admi[^\\/])$"
    replacement: "$1/"

Works like a charm if I try to reach /admia but still redirects to :8080/admin/ using /admin

0

There are 0 best solutions below