Skip to content

Commit c71ef11

Browse files
committed
Fix local tileserver/featureserver URLS
1 parent 4d8806d commit c71ef11

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

bcap/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ def get_env_variable(var_name, is_optional=False):
701701
BC_TILESERVER_URLS = {
702702
"maps": "https://maps.gov.bc.ca/",
703703
"openmaps": TILESERVER_URL,
704-
"local": "http://bcap-pg_tileserv7-6:7800/",
705-
"local-feature": "http://bcap-pg_featureserv7-6:9000/",
704+
"local": get_env_variable("TILESERVER_LOCAL_URL"),
705+
"local-feature": get_env_variable("FEATURESERVER_LOCAL_URL"),
706706
}
707707

708708
AUTH_BYPASS_HOSTS = get_env_variable("AUTH_BYPASS_HOSTS")

bcap/urls.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
TranslateToResourceTypeView,
1515
)
1616
from bcap.views.resource import ResourceReportView, ResourceEditLogView
17-
from bcgov_arches_common.views.map import BCTileserverProxyView
17+
from bcgov_arches_common.views.map import BCTileserverProxyView, BCTileserverLocalProxyView
1818

1919
uuid_regex = settings.UUID_REGEX
2020

@@ -39,6 +39,16 @@
3939
BCTileserverProxyView.as_view(),
4040
name="bcap_tile_server",
4141
),
42+
path(
43+
f"{PREFIX}bclocaltileserver/",
44+
BCTileserverLocalProxyView.as_view(),
45+
name="bcap_local_tile_server_root",
46+
),
47+
path(
48+
f"{PREFIX}bclocaltileserver/<path:path>",
49+
BCTileserverLocalProxyView.as_view(),
50+
name="bcap_local_tile_server",
51+
),
4252
path(
4353
f"{PREFIX}borden_number/<uuid:resourceinstanceid>",
4454
BordenNumber.as_view(),

dot.env.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,6 @@ OAUTH_SERVER_METADATA_URL={{ oauth_server_metadata_url }}
8787
#OAUTHLIB_INSECURE_TRANSPORT=True
8888

8989
#Local Tileserver config
90-
TILESERVER_OUTBOUND_PROXY={{ proxy_env.https_proxy }}
90+
TILESERVER_OUTBOUND_PROXY={{ proxy_env.https_proxy }}
91+
TILESERVER_LOCAL_URL=http://localhost:{{ tileserv_http_listen_port }}/
92+
FEATURESERVER_LOCAL_URL=http://localhost:{{ featureserv_http_listen_port }}/

0 commit comments

Comments
 (0)