Play Framework scala CORS error

Hi All,
I am a Rails developer and now learning Scala.
I have one scala application and it’s using ‘sbt’ to run the server.
I am having CORS issues white accessing the API’s.
Request failed:
Note: Check CORS is enabled

I have followed this document, but still, it’s not working.
It would be great if I would get some help ASAP.