maps icon indicating copy to clipboard operation
maps copied to clipboard

Doesn't use proxy server configured in Nextcloud

Open debfx opened this issue 5 years ago • 2 comments

AddressService::lookupAddressExternal() makes a request to https://nominatim.openstreetmap.org/ without using the proxy server configured in Nextcloud (proxy, proxyuserpwd, etc. config parameters).

debfx avatar Jun 28 '20 10:06 debfx

Are there any news on this? This is spamming my firewall logs ;-) The Server is only allowed to access the "internet" via my proxy server.

Starkstromkonsument avatar Dec 26 '22 22:12 Starkstromkonsument

I guess this is the code to be changed:

https://github.com/nextcloud/maps/blob/ae6d34764e5b2302872ceac537f298d091d528ad/lib/Service/AddressService.php#L171-L177

Line to be inserted: 'proxy' => '...',

I don't know how to properly get the proxy settings from nextcloud yet though. This is an example from the news addon:

https://github.com/nextcloud/news/blob/48ee5ce4d135da20079961a62ae37958d6a6b628/lib/Config/FetcherConfig.php#L79

Corresponding PHP-Docs:

  • https://www.php.net/manual/en/function.stream-context-create.php
  • https://www.php.net/manual/en/context.http.php

Starkstromkonsument avatar Dec 26 '22 23:12 Starkstromkonsument