File tree Expand file tree Collapse file tree 3 files changed +33
-18
lines changed
Expand file tree Collapse file tree 3 files changed +33
-18
lines changed Original file line number Diff line number Diff line change @@ -617,9 +617,22 @@ def get_env_variable(var_name, default=None):
617617# This is the default if source isn't set as a parameter in the request
618618TILESERVER_URL = "https://openmaps.gov.bc.ca/"
619619BC_TILESERVER_URLS = {
620- "maps" : "https://maps.gov.bc.ca/" ,
621- "openmaps" : TILESERVER_URL ,
622- "local" : "http://localhost:7800/" ,
620+ "maps" : {
621+ "url" : "https://maps.gov.bc.ca/" ,
622+ "use_outbound_proxy" : True , # Use outbound proxy for this source
623+ },
624+ "openmaps" : {
625+ "url" : TILESERVER_URL ,
626+ "use_outbound_proxy" : True , # Use outbound proxy for this source
627+ },
628+ "local" : {
629+ "url" : get_env_variable ("TILESERVER_LOCAL_URL" ),
630+ "use_outbound_proxy" : False , # Local doesn't need outbound proxy
631+ },
632+ "local-feature" : {
633+ "url" : get_env_variable ("FEATURESERVER_LOCAL_URL" ),
634+ "use_outbound_proxy" : False , # Local doesn't need outbound proxy
635+ },
623636}
624637
625638AUTH_BYPASS_HOSTS = get_env_variable ("AUTH_BYPASS_HOSTS" , default = "localhost" )
Original file line number Diff line number Diff line change @@ -699,10 +699,22 @@ def get_env_variable(var_name, is_optional=False):
699699# This is the default if source isn't set as a parameter in the request
700700TILESERVER_URL = "https://openmaps.gov.bc.ca/"
701701BC_TILESERVER_URLS = {
702- "maps" : "https://maps.gov.bc.ca/" ,
703- "openmaps" : TILESERVER_URL ,
704- "local" : get_env_variable ("TILESERVER_LOCAL_URL" ),
705- "local-feature" : get_env_variable ("FEATURESERVER_LOCAL_URL" ),
702+ "maps" : {
703+ "url" : "https://maps.gov.bc.ca/" ,
704+ "use_outbound_proxy" : True # Use outbound proxy for this source
705+ },
706+ "openmaps" : {
707+ "url" : TILESERVER_URL ,
708+ "use_outbound_proxy" : True # Don't use outbound proxy for this source
709+ },
710+ "local" : {
711+ "url" : get_env_variable ("TILESERVER_LOCAL_URL" ),
712+ "use_outbound_proxy" : False # Local doesn't need outbound proxy
713+ },
714+ "local-feature" : {
715+ "url" : get_env_variable ("FEATURESERVER_LOCAL_URL" ),
716+ "use_outbound_proxy" : False # Local doesn't need outbound proxy
717+ },
706718}
707719
708720AUTH_BYPASS_HOSTS = get_env_variable ("AUTH_BYPASS_HOSTS" )
Original file line number Diff line number Diff line change 1414 TranslateToResourceTypeView ,
1515)
1616from bcap .views .resource import ResourceReportView , ResourceEditLogView
17- from bcgov_arches_common .views .map import BCTileserverProxyView , BCTileserverLocalProxyView
17+ from bcgov_arches_common .views .map import BCTileserverProxyView
1818
1919uuid_regex = settings .UUID_REGEX
2020
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- ),
5242 path (
5343 f"{ PREFIX } borden_number/<uuid:resourceinstanceid>" ,
5444 BordenNumber .as_view (),
You can’t perform that action at this time.
0 commit comments