当我想从一个有角度的应用程序访问它时,我的DropWizard服务器出了问题.错误是:
XMLHttpRequest cannot load https://localhost:8080/admin/metrics. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
我已经看过这里 Dropwizard解决CORS问题
它实际上适用于以下地址:
https://localhost:8080/myResource/list
但不是预配置/管理资源
https://localhost:8080/admin/metrics.
它似乎表明添加到环境中的过滤器仅用于/ api而不用于/ admin ...
我需要帮助吗?