20#ifndef QGSSERVERSETTINGS_H
21#define QGSSERVERSETTINGS_H
27#include "qgis_server.h"
122 bool load(
const QString &envVarName );
127 void logSummary()
const;
133 QString iniFile()
const;
139 bool parallelRendering()
const;
145 int maxThreads()
const;
160 bool logProfile()
const;
166 QString projectFile()
const;
172 QString logFile()
const;
179 bool logStderr()
const;
185 qint64 cacheSize()
const;
191 QString cacheDirectory()
const;
198 QString overrideSystemLocale()
const;
205 bool showGroupSeparator()
const;
227 QString landingPageProjectsDirectories()
const;
235 QString landingPageProjectsPgConnections()
const;
241 QString landingPageBaseUrlPrefix()
const;
251 QString apiResourcesDirectory()
const;
261 qlonglong apiWfs3MaxLimit()
const;
272 bool ignoreBadLayers()
const;
282 bool trustLayerMetadata()
const;
292 bool forceReadOnlyLayers()
const;
303 bool getPrintDisabled()
const;
309 QString
serviceUrl(
const QString &service )
const;
315 int projectCacheCheckInterval()
const;
330 QString projectCacheStrategy()
const;
340 QStringList allowedExtraSqlTokens()
const;
351 QMap<QgsServerSettingsEnv::EnvVar, QString> getEnv()
const;
352 void loadQSettings(
const QString &envOptPath )
const;
353 void prioritize(
const QMap<QgsServerSettingsEnv::EnvVar, QString> &env );
355 QMap< QgsServerSettingsEnv::EnvVar, Setting > mSettings;
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Provides some enum describing the environment currently supported for configuration.
Source
Source of the parameter used in the configuration.
EnvVar
Environment variables to configure the server.
@ QGIS_SERVER_WCS_SERVICE_URL
To set the WCS service URL if it's not present in the project. (since QGIS 3.20).
@ QGIS_SERVER_WMTS_SERVICE_URL
To set the WMTS service URL if it's not present in the project. (since QGIS 3.20).
@ QGIS_SERVER_IGNORE_BAD_LAYERS
Do not consider the whole project unavailable if it contains bad layers.
@ QGIS_SERVER_ALLOWED_EXTRA_SQL_TOKENS
Set the project cache strategy. Possible values are 'filesystem', 'periodic' or 'off' (since QGIS 3....
@ QGIS_SERVER_MAX_THREADS
@ QGIS_SERVER_LANDING_PAGE_PREFIX
@ QGIS_SERVER_TRUST_LAYER_METADATA
Trust layer metadata. Improves project read time. (since QGIS 3.16).
@ QGIS_SERVER_WFS_SERVICE_URL
To set the WFS service URL if it's not present in the project. (since QGIS 3.20).
@ QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE
Override system locale (since QGIS 3.8)
@ QGIS_SERVER_LANDING_PAGE_PROJECTS_PG_CONNECTIONS
PostgreSQL connection strings used by the landing page service to find projects (since QGIS 3....
@ QGIS_SERVER_PARALLEL_RENDERING
@ QGIS_SERVER_API_WFS3_MAX_LIMIT
Maximum value for "limit" in a features request, defaults to 10000 (since QGIS 3.10).
@ QGIS_SERVER_API_RESOURCES_DIRECTORY
Base directory where HTML templates and static assets (e.g. images, js and css files) are searched fo...
@ QGIS_SERVER_WMS_MAX_WIDTH
Maximum width for a WMS request. The most conservative between this and the project one is used (sinc...
@ QGIS_SERVER_FORCE_READONLY_LAYERS
Force to open layers in read-only mode. (since QGIS 3.28).
@ QGIS_SERVER_PROJECT_CACHE_STRATEGY
Set the interval for cache invalidation strategy 'interval', default to 0 which select the legacy Fil...
@ QGIS_SERVER_WMS_MAX_HEIGHT
Maximum height for a WMS request. The most conservative between this and the project one is used (sin...
@ QGIS_SERVER_WMS_SERVICE_URL
To set the WMS service URL if it's not present in the project. (since QGIS 3.20).
@ QGIS_SERVER_DISABLE_GETPRINT
Disabled WMS GetPrint request and don't load layouts. Improves project read time. (since QGIS 3....
@ QGIS_SERVER_PROJECT_CACHE_CHECK_INTERVAL
Prefix of the path component of the landing page base URL, default is empty (since QGIS 3....
@ QGIS_SERVER_CACHE_DIRECTORY
@ QGIS_SERVER_SHOW_GROUP_SEPARATOR
Show group (thousands) separator when formatting numeric values, defaults to false (since QGIS 3....
@ QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES
Directories used by the landing page service to find .qgs and .qgz projects (since QGIS 3....
@ QGIS_SERVER_LOG_PROFILE
When QGIS_SERVER_LOG_LEVEL is 0 this flag adds to the logs detailed information about the time taken ...
@ QGIS_SERVER_SERVICE_URL
To set the service URL if it's not present in the project. (since QGIS 3.20).
Provides a way to retrieve settings by prioritizing according to environment variables,...
SERVER_EXPORT QString serviceUrl(const QString &service, const QgsServerRequest &request, const QgsServerSettings &settings)
Returns the service url defined in the environment variable or with HTTP header.
SERVER_EXPORT int wmsMaxWidth(const QgsProject &project)
Returns the maximum width for WMS images defined in a QGIS project.
SERVER_EXPORT int wmsMaxHeight(const QgsProject &project)
Returns the maximum height for WMS images defined in a QGIS project.
QgsServerSettingsEnv::EnvVar envVar
QgsServerSettingsEnv::Source src