Backup restore blocked by CORS policy

Hello there,

Describe the bug

With NFS backup target (I didn’t try with S3 backup), backup are done correctly.
But when I try to restore with “Create Disaster Recovery Volume” or “Restore Latest Backup”, nothing happens.

In javascript console, I can see:

Access to XMLHttpRequest at 'wss://cluster.mydomain/backupvolumes/myvolume?action=backupList' from origin 'https://cluster.mydomain' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.

Tryed with Google Chrome and Firefox

Expected behavior

In 1.1.2, a popup should be opened to configure the restoration

Environment

  • Longhorn version: 1.2.2
  • Installation method (e.g. Rancher Catalog App/Helm/Kubectl): Rancher
  • Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.21.6+k3s1
    • Number of management node in the cluster: 3
    • Number of worker node in the cluster: 1
    • OS type and version: Debian 11

I would to use this KB: Troubleshooting: Use Traefik 2.x as ingress controller | The Longhorn Knowledge Base

I hope it will correct the problem, but I have no idea how to do that
Any help?

@ppcm
Check if your traefik CRD exist first.
If yes, deploy the middleware and then update the ingress by “kubectl edit…”

@derek.su thanks a lot for your answer, but I don’t know how to do that
Rancher 2.6.2 (the latest version) is installed from scratch with K3s 1.21.6+k3s1. I follow documentation from Rancher to make it works.

helm-install-traefik-crd is deployed and completed, but if you have some documentation to follow to install the middleware and update ingress, it will be welcommed
Thanks

cc @JenTing Is it correct that users just need to deploy the CRDs in the instruction Troubleshooting: Use Traefik 2.x as ingress controller | The Longhorn Knowledge Base ?

Yes, the user just needs to follow the knowledge base to fix the Traefix 2.x issue.

If I remember correctly, k3s start from v1.22, the default Traefik is 2.x.
However, the user uses k3s 1.21.6+k3s1, I remember it’s using the Traefix 1.x.

@ppcm, had you manually installed the Traefik 2.x into the Kubernetes cluster?

I didn’t succeed, I decide to wait uodate of Rancher and K3s