HTTP frontend
The http frontend is a middleware proxy for routing requests to Qgis worker pool backends.
Each backend is a gRPC client that will route incoming requests to the configured backend by defining a path root prefix similar to the root directive of a proxy server.
Routing OWS requests to Qgis pools
Each backend is configured with a backend.<id> settings.
Passing request for a particular backend is done with the route as leading path:
[backend.pool1]
route = "/route_path"
Note
Project may be specified in serveral way:
Use MAP parameter:
https://test.com/route_path?MAP=/search_path/project_path&SERVICE=...
Add project’s search path to url path:
https//test.com/route_path/search_path/#/project_path?SERVICE=...
Or specify the full project’s search path with the X-Qgis-Project header.
Api endpoints
Qgis api endpoints must be declared explicitly in order to be requested by client:
[[backends.test.api]]
endpoint = "wfs3"
name = "Feature OGC Api (WFS3 Draft)
Note
Project is specified the same way as for OWS endpoints
With the MAP parameter:
https://test.com/route_path/api/path/>?MAP=/search_path/project_path
or the X-Qgis-Project header.
If you want to pass the project full search path in the url path, it must be done in a way to disambiguate the api path from the project’s path. This is achieved by separating the search path from the api path with a _:
https://test.com/route_path/search_path/project_path/_/api/path
Service configuration
[logging]
level = "INFO"
[server]
#
# Interfaces to listen to
address = "127.0.0.1:9080"
#
# Use TLS
enable_tls = false
#
# Client CA file
#
# Certificat for client authentification
#tls_client_cafile = # Optional
#
# TLS key
#
# Path to the TLS key file
#tls_cert_file = # Optional
#
# SSL/TLS Certificat
#
# Path to the TLS certificat file
#tls_key_file = # Optional
#
# CORS origin
#
# Allows to specify origin for CORS. If set 'all' will set
# Access-Control-Allow-Origin to '*'; 'same-origin' return
# the same value as the 'Origin' request header.
# A url may may be specified, restricting allowed origin to
# this url.
#
cross_origin = "all"
#
# Workers
#
# Numbers of worker threads
#num_workers = # Optional
#
# Request timeout
backends_request_timeout = 30
#
# Shutdown timeout
#
# Shutdown grace period
shutdown_timeout = 30
#[backends.key]
#
# Hostname
#host = "localhost"
#
# Port
#port = 23456
#
# Enable TLS
#enable_tls = false
#
# CA file
#cafile = # Optional
#
# TLS key file
#
# Path to the TLS key file
#client_key_file = # Optional
#
# TLS Certificat
#
# Path to the TLS certificat file
#client_cert_file = # Optional
#
# A descriptive title
#title = ""
#
# A description of the service
#description = ""
#
# Route to service
#route = # Required
#
# Request timeout
#
# Set the timeout for Qgis response in seconds.
# If a Qgis worker takes more than the corresponding value
# a timeout error (504) is returned to the client.
#timeout = 20
#
# Forwarded headers
#
# Set the headers that will be forwarded to the Qgis server backend.
# This may be useful if you have plugins that may deal with request headers.
#forward_headers = ["x-qgis-*","x-lizmap-*"]
#
# Allow direct path resolution
#
# Allow remote worker to use direct project path resolution.
# WARNING: allowing this may be a security vulnerabilty.
# See worker configuration for details.
#allow_direct_resolution = false
#
# Api endpoints
#
#[[backends.key.api]]
#
# Api endpoint
#endpoint = # Required
#
# Api name to delegate to
#
# Api delegation allow for using a baseurl different
# from the expected rootpath of qgis server api.
# For exemple, wfs3 request may be mapped to a completely different
# root path.
#
#delegate_to = # Optional
#
# Descriptive name
#name = ""
#
# Api description
#description = ""
#
# Enable html in delegated endpoint
#
# Enable fetching html resources in delegated endpoints.
# Enable this if the delegated api handle correctly html
# template resource resolution in Qgis server when using
# delegated api endpoint.
#enable_html_delegate = false
#
# Path to services configuration files
#
# Path or globbing to services configuration files.
# Note that this section is ignored if remote configuration
# is used.
#
#
# Path to services configuration files
#
# Path or globbing to services configuration files.
# Note that this section is ignored if remote configuration
# is used.
#
#includes = # Optional