CORS error when submitting form trigger

What worked for me was to set traefik tags to this:
tags = [ "traefik.http.middlewares.n8n-csp.headers.customResponseHeaders.Content-Security-Policy=sandbox allow-downloads allow-forms allow-modals allow-popups allow-scripts allow-same-origin allow-top-navigation-by-user-activation", "traefik.http.routers.n8n.middlewares=n8n-csp" ]

Based on this post.