CORS - 请求的资源上没有“Access-Control-Allow-Origin”标头

时间:2017-06-23 08:55:25

标签: spring spring-mvc spring-boot cors jhipster

我正在使用启用了cors支持的jhipster开发应用程序。

这是我的jhister配置 -

cors:
    allowed-origins: "*"
    allowed-methods: GET, PUT, POST, DELETE, OPTIONS
    allowed-headers: "*"
    exposed-headers: 
    allow-credentials: true
    max-age: 1800

但是当我使用 application / json 类型生成 POST 请求时,会产生以下错误 -

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access. The response had HTTP status code 403.

0 个答案:

没有答案