Skip to content

Commit

Permalink
Fix missing http_proxy in managment handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Dec 1, 2022
1 parent e7ea611 commit 76b4670
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this

## Unreleased

### Fixed

* Fix Fix missing http_proxy in managment handler

### Added

* Add informative warning on dangling plugin symlink
Expand Down
1 change: 0 additions & 1 deletion pyqgisserver/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def load_configuration():
CONFIG.set('api.enabled', 'lizmap_api', getenv('QGSRV_API_ENABLED_LIZMAP','no'))

# Landing page config mapping
# see: https://github.com/qgis/QGIS/pull/38189#issuecomment-875682735
CONFIG.add_section('api:landing_page')
CONFIG.set('api:landing_page', 'QGIS_SERVER_LANDING_PAGE_PREFIX',
'${api.endpoints:landing_page}')
Expand Down
2 changes: 1 addition & 1 deletion pyqgisserver/handlers/basehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def on_connection_close(self) -> None:
self.logger.warning("Connection closed by client: {}".format(self.request.uri))

def set_option_headers(self, allow_header: Optional[str]=None) -> None:
""" Set correct headers for 'OPTION' method
""" Set correct headers for 'OPTIONS' method
"""
if not allow_header:
allow_header = ', '.join( me for me in self.SUPPORTED_METHODS if hasattr(self, me.lower()) )
Expand Down
1 change: 1 addition & 0 deletions pyqgisserver/management/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def __init__(self, poolserver, router: str) -> None:
super().__init__(configure_handlers(poolserver, self._broker_client),
default_handler_class=NotFoundHandler)

self.http_proxy = confservice.getboolean('server','http_proxy')

def log_request(self, handler: tornado.web.RequestHandler ) -> None:
""" Write HTTP requet to the logs
Expand Down
2 changes: 1 addition & 1 deletion pyqgisserver/utils/qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def set_proxy_configuration( logger: logging.Logger ) -> None:
if proxy_type == QNetworkProxy.NoProxy:
return

logger.info("Proxy configuration enabled: %s:%s, type: %s",
logger.info("QGIS Proxy configuration enabled: %s:%s, type: %s",
proxy.hostName(), proxy.port(),
{ QNetworkProxy.DefaultProxy: 'DefaultProxy',
QNetworkProxy.Socks5Proxy: 'Socks5Proxy' ,
Expand Down

0 comments on commit 76b4670

Please sign in to comment.