是否允许将表单操作设置为在内容安全策略中包含 *.localhost:3000



我收到此错误:

Refused to send form data to 'http://example-subdomain.localhost:3000/'
because it violates the following Content Security Policy directive:
"form-action 'self' *.example.co *.localhost:3000".

所以简单地说,我想从暂存服务器(example-staging.com(重定向到本地机器(http://example-subdomain.localhost:3000/(。当我为后端应用程序使用 localhost:4000 时,它可以完美运行,因此从 localhost:4000 重定向到 http://example-subdomain.localhost:3000/ .

所以只是澄清什么是什么:

http://example-subdomain.localhost:3000/ - 本地计算机上的前端应用

example-staging.com - 暂存服务器、后端 API

localhost:4000 - 本地计算机上的后端应用

我只在Chrome中测试了这个东西。它在火狐中工作正常。看起来像Chrome浏览器中的错误。我要报告它。

最新更新