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.
Error:
Request failed:
Note: Check CORS is enabled

I have followed this document, but still, it’s not working.
Docs: https://www.playframework.com/documentation/2.8.x/resources/confs/filters-helpers/reference.conf
It would be great if I would get some help ASAP.

Thanks