All Downloads are FREE. Search and download functionalities are using the official Maven repository.

docs._configurations.10_general_config.md Maven / Gradle / Ivy

There is a newer version: 2.0.1-alpha.8
Show newest version
---
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.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy