Skip to content

Commit

Permalink
for the local development we need to set localhost:<port> as wmsUrl
Browse files Browse the repository at this point in the history
in that case the protocol should not be set to https
  • Loading branch information
ltclm committed Aug 7, 2024
1 parent 34e6904 commit 9aa1457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chsdi/models/bod.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ def layerConfig(self, params):
del config['timeBehaviour']

if config['type'] == 'wms':
config['wmsUrl'] = 'https://%s' % wmsHost
# do not use https if wmsUrl starts with localhost
protocol = "http" if wmsHost.lower().startswith('localhost') else "https"
config['wmsUrl'] = f'{protocol}://{wmsHost}'
elif config['type'] == 'geojson':
api_url = params.request.registry.settings['api_url']
config['styleUrl'] = make_agnostic(
Expand Down

0 comments on commit 9aa1457

Please sign in to comment.