Revert "remove application level CORS (leave to server)"
This reverts commit 8e931e644f.
This commit is contained in:
@@ -5,6 +5,7 @@ server:
|
||||
mimetype: application/json; charset=UTF-8
|
||||
encoding: utf-8
|
||||
language: en-US
|
||||
cors: true
|
||||
pretty_print: true
|
||||
limit: 10
|
||||
|
||||
|
||||
@@ -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,6 +1,7 @@
|
||||
click
|
||||
elasticsearch
|
||||
flask
|
||||
flask_cors
|
||||
pyyaml
|
||||
requests
|
||||
shapely
|
||||
|
||||
Reference in New Issue
Block a user