geovisio 2.8.0__py3-none-any.whl → 2.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geovisio/__init__.py +16 -3
- geovisio/config_app.py +0 -1
- geovisio/translations/br/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/br/LC_MESSAGES/messages.po +762 -0
- geovisio/translations/da/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/da/LC_MESSAGES/messages.po +10 -1
- geovisio/translations/de/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/de/LC_MESSAGES/messages.po +10 -1
- geovisio/translations/en/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/en/LC_MESSAGES/messages.po +9 -7
- geovisio/translations/eo/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/eo/LC_MESSAGES/messages.po +67 -1
- geovisio/translations/es/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/es/LC_MESSAGES/messages.po +4 -3
- geovisio/translations/fr/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/fr/LC_MESSAGES/messages.po +30 -4
- geovisio/translations/hu/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/hu/LC_MESSAGES/messages.po +4 -3
- geovisio/translations/it/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/it/LC_MESSAGES/messages.po +10 -1
- geovisio/translations/ja/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/ja/LC_MESSAGES/messages.po +242 -154
- geovisio/translations/pl/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/pl/LC_MESSAGES/messages.po +4 -3
- geovisio/utils/loggers.py +14 -0
- geovisio/utils/params.py +7 -4
- geovisio/utils/upload_set.py +24 -10
- geovisio/utils/website.py +3 -0
- geovisio/web/auth.py +3 -2
- geovisio/web/docs.py +3 -14
- geovisio/web/upload_set.py +98 -10
- geovisio/web/users.py +31 -4
- {geovisio-2.8.0.dist-info → geovisio-2.8.1.dist-info}/METADATA +4 -3
- {geovisio-2.8.0.dist-info → geovisio-2.8.1.dist-info}/RECORD +36 -33
- {geovisio-2.8.0.dist-info → geovisio-2.8.1.dist-info}/WHEEL +1 -1
- {geovisio-2.8.0.dist-info → geovisio-2.8.1.dist-info/licenses}/LICENSE +0 -0
geovisio/__init__.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""GeoVisio API - Main"""
|
|
2
2
|
|
|
3
|
-
__version__ = "2.8.
|
|
3
|
+
__version__ = "2.8.1"
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from flask import Flask, jsonify, stream_template, send_from_directory, redirect, request
|
|
6
|
+
from flask import Flask, jsonify, stream_template, send_from_directory, redirect, request, url_for
|
|
7
7
|
from flask.cli import with_appcontext
|
|
8
8
|
from flask_cors import CORS
|
|
9
9
|
from flask_compress import Compress
|
|
@@ -106,7 +106,9 @@ def create_app(test_config=None, app=None):
|
|
|
106
106
|
# https://flask.palletsprojects.com/en/2.2.x/deploying/proxy_fix/
|
|
107
107
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
|
108
108
|
|
|
109
|
-
app.wsgi_app = ProxyFix(
|
|
109
|
+
app.wsgi_app = ProxyFix(
|
|
110
|
+
app.wsgi_app, x_for=nb_proxies, x_proto=nb_proxies, x_host=nb_proxies, x_prefix=nb_proxies, x_port=nb_proxies
|
|
111
|
+
)
|
|
110
112
|
|
|
111
113
|
# store the background processor in the app context
|
|
112
114
|
app.background_processor = runner_pictures.PictureBackgroundProcessor(app)
|
|
@@ -185,6 +187,17 @@ def create_app(test_config=None, app=None):
|
|
|
185
187
|
def favicon():
|
|
186
188
|
return redirect("/static/img/favicon.ico")
|
|
187
189
|
|
|
190
|
+
@app.route("/api/debug_headers")
|
|
191
|
+
def debug_headers():
|
|
192
|
+
"""Endpoint handy when setting a new instance to check if all the headers are set correctly,
|
|
193
|
+
and especially the X-Forwarded-* header that needs to be set by the proxies in order for the API to correctly build internal urls.
|
|
194
|
+
|
|
195
|
+
The headers are only printed to the console, so it's only for the instance administrator that has access to those logs.
|
|
196
|
+
"""
|
|
197
|
+
logging.info(request.headers)
|
|
198
|
+
|
|
199
|
+
return jsonify({"test_url": url_for("index", _external=True)}), 200
|
|
200
|
+
|
|
188
201
|
# Errors
|
|
189
202
|
@app.errorhandler(errors.InvalidAPIUsage)
|
|
190
203
|
def invalid_api_usage(e):
|
geovisio/config_app.py
CHANGED
|
@@ -38,7 +38,6 @@ class DefaultConfig:
|
|
|
38
38
|
DB_CHECK_SCHEMA = True # If True check the database schema, and do not start the api if not up to date
|
|
39
39
|
API_PICTURES_LICENSE_SPDX_ID = None
|
|
40
40
|
API_PICTURES_LICENSE_URL = None
|
|
41
|
-
API_WEBSITE_URL = None # URL to the website, used to generate links to the website. If not set, the API will presume the website runs from the same url.
|
|
42
41
|
DEBUG_PICTURES_SKIP_FS_CHECKS_WITH_PUBLIC_URL = False
|
|
43
42
|
SESSION_COOKIE_HTTPONLY = False
|
|
44
43
|
PICTURE_PROCESS_REFRESH_CRON = (
|
|
Binary file
|