docs._configurations.10_general_config.md Maven / Gradle / Ivy
---
layout: page
title: General Configuration
permalink: /configuration/general
---
## General Configuration
### Query Parameter Defaults
Query parameter defaults can be changed under `WEB-INF/classes/config-general.json`. For example
```json
{
"timeformat": "YYYY-MM-dd, HH:mm",
"generalizer": {
"defaultGeneralizer": "lttb",
"noDataGapThreshold": 5
},
"grid": false
}
```
{:.n52-callout .n52-callout-info}
Changing API defaults may lead to unexpected results to Web clients. Only change defaults
if you know what you are doing.
### Enabling CORS
[CORS](https://enable-cors.org/index.html) can be enabled via a third party filter (to stay
independend from a concrete Servlet container which may not ship such filter) within a Web
application's `web.xml` file. A simple example (which allows all requests) may look like this:
```xml
CORS
com.thetransactioncompany.cors.CORSFilter
cors.allowOrigin
*
cors.allowGenericHttpRequests
true
cors.supportedMethods
GET, POST, HEAD, PUT, DELETE, OPTIONS
cors.supportedHeaders
Content-Type, Content-Encoding, Accept
cors.exposedHeaders
Content-Type, Content-Encoding
CORS
/*
```
{:.n52-callout .n52-callout-info}
You can [test your CORS config](http://www.test-cors.org/) if configured correctly.