Spring CORS Filter

A CORS filter configurable implementation for your Spring application

License

License

GroupId

GroupId

io.sprucehill
ArtifactId

ArtifactId

spring-cors-filter
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Spring CORS Filter
A CORS filter configurable implementation for your Spring application
Project URL

Project URL

https://github.com/SpruceHillio/spring-cors-filter
Source Code Management

Source Code Management

https://github.com/SpruceHillio/spring-cors-filter.git

Download spring-cors-filter

How to add to project

<!-- https://jarcasting.com/artifacts/io.sprucehill/spring-cors-filter/ -->
<dependency>
    <groupId>io.sprucehill</groupId>
    <artifactId>spring-cors-filter</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.sprucehill/spring-cors-filter/
implementation 'io.sprucehill:spring-cors-filter:1.0.0'
// https://jarcasting.com/artifacts/io.sprucehill/spring-cors-filter/
implementation ("io.sprucehill:spring-cors-filter:1.0.0")
'io.sprucehill:spring-cors-filter:jar:1.0.0'
<dependency org="io.sprucehill" name="spring-cors-filter" rev="1.0.0">
  <artifact name="spring-cors-filter" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.sprucehill', module='spring-cors-filter', version='1.0.0')
)
libraryDependencies += "io.sprucehill" % "spring-cors-filter" % "1.0.0"
[io.sprucehill/spring-cors-filter "1.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.springframework : spring-core jar 4.2.1.RELEASE
org.slf4j : slf4j-api jar 1.7.12
org.springframework : spring-web jar 4.2.1.RELEASE

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.0.1

Project Modules

There are no modules declared in this project.

Spring CORS Filter

A simple OncePerRequestFilter implementation offering the possibility to add CORS relevant header to HTTP responses.

Getting started

Include the JAR

Include the JAR file as dependency on your project. It is availble through Maven central.

Maven

<dependency>
    <groupId>io.sprucehill</groupId>
    <artifactId>spring-cors-filter</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

compile 'io.sprucehill.spring-cors-filter:1.0.0

Enable the bean

If you're using JavaConfig and ComponentScan, make sure, that io.sprucehill.spring.filter is scanned and add at least the following property to your application.properties file

io.sprucehill.spring.filter.cors.enable=true

Please refer to the included application.properties file for further configuration options.

io.sprucehill

SpruceHill.io GmbH

Versions

Version
1.0.0