Revert "remove application level CORS (leave to server)"

This reverts commit 8e931e644f.
This commit is contained in:
Tom Kralidis
2018-03-27 21:26:21 -04:00
parent 8e931e644f
commit 403fa4648b
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ server:
mimetype: application/json; charset=UTF-8
encoding: utf-8
language: en-US
cors: true
pretty_print: true
limit: 10
+4
View File
@@ -34,6 +34,7 @@ import yaml
import click
from flask import Flask, make_response, request
from flask_cors import CORS
from pygeoapi import views
from pygeoapi.config import settings
@@ -109,6 +110,9 @@ def serve(ctx, debug=False):
if not settings['server']['pretty_print']:
APP.config['JSONIFY_PRETTYPRINT_REGULAR'] = False
if settings['server']['cors']:
CORS(APP)
setup_logger()
# TODO: get scheme
BASEURL = get_url('http', settings['server']['host'],
+1
View File
@@ -1,6 +1,7 @@
click
elasticsearch
flask
flask_cors
pyyaml
requests
shapely