Search code examples
javaplayframeworklagom

maven dependency for play.filters.cors.CORSFilter


I am trying to add a CORS Filter to my Lagom Framework REST API. I added a Filters class, as per the documentation, however it cannot to find the package for CROSSFilter. Need MAVEN dependency flay framework CrossFilter


Solution

  • You need filters helper package

    <dependency>
        <groupId>com.typesafe.play</groupId>
        <artifactId>filters-helpers_2.11</artifactId>
        <version>2.5.13</version>
    </dependency>
    

    Different versions:

    https://mvnrepository.com/artifact/com.typesafe.play/filters-helpers_2.11 https://mvnrepository.com/artifact/com.typesafe.play/filters-helpers_2.10

    API Docs:

    https://www.javadoc.io/doc/com.typesafe.play/filters-helpers_2.11/2.5.13