apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

Absolute file path reference causes path base ingress fail #ingress #rewrite-target-regex #ImplementationSpecific

Open damoshushu opened this issue 1 year ago • 1 comments

Issue description

Hi Apisix Team,

I am trying to config the ingress of dashboard service as following, however I found that accessing the dashboard page failed with an error. It is because the files referenced in the main page are using absolute path.

dashboard:
  enabled: true
  ingress:
    enabled: true
    className: apisix
    annotations:
      k8s.apisix.apache.org/rewrite-target-regex: "/dashboard/(.*)"
      k8s.apisix.apache.org/rewrite-target-regex-template: "/$1"
    hosts:
    - host: apisix-dashboard.local
      paths: &dashboard_paths
        - "/dashboard"
        - "/dashboard/*"
    - host: www.xxx.io
      paths: *dashboard_paths

image

Expected behavior

relative path is expected to be used, and it should support path based ingress rule

How to Reproduce

deploy the ingress with a specified path rather than "/"

Screenshots

No response

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version):
  • apisix-dashboard version, if have:
  • Browser version, if have:

Additional context

No response

damoshushu avatar Feb 02 '24 07:02 damoshushu