Trouble-shooting CORS in Play Framework 2.4.x

前端 未结 7 684
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 14:55

I have a java play framework 2.4.x web app providing a JSON/HTTP API. When I run my front-end HTML/JS file:///Users/nize/tmp/index.html calling the API on

7条回答
  •  天涯浪人
    2020-12-10 15:32

    I was experiencing a similar issue, I was getting 403's on requests. I solved a the problem by removing the:

    allowedHttpHeaders=["Accept"] 
    

    that they use in their example configuration. I'm still not clear what the security implications of that are, however, so YMMV.

提交回复
热议问题