Skip to content

Commit

Permalink
Issue #128 also add Cache-Control headers on /.well-known/openeo
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Jun 2, 2022
1 parent 8fac572 commit e7e89ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions openeo_driver/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def _before_request():

# Note: /.well-known/openeo should be available directly under domain, without version prefix.
@app.route('/.well-known/openeo', methods=['GET'])
@backend_implementation.cache_control
def well_known_openeo():
return jsonify({
'versions': [
Expand Down
1 change: 1 addition & 0 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_well_known_openeo(self, client):
"1.0.0": {'api_version': '1.0.0', 'production': True, 'url': 'http://oeo.net/openeo/1.0/'},
"1.1.0": {'api_version': '1.1.0', 'production': True, 'url': 'http://oeo.net/openeo/1.1/'},
}
assert resp.headers["Cache-Control"] == "max-age=900, public"

def test_versioned_well_known_openeo(self, api):
api.get('/.well-known/openeo').assert_error(404, "NotFound")
Expand Down

0 comments on commit e7e89ec

Please sign in to comment.