Skip to content
Snippets Groups Projects
Commit 909dada3 authored by anonymous's avatar anonymous
Browse files

prevents occurences of the master IP on the frontend

http://{IP}/api/i18n/de wouldn't be passed through the apache proxy because it got generated by javascript with the master IP on sites like dataset/new

On the same sites the master IP would be found in the HTML
parent aafd4834
No related branches found
No related tags found
No related merge requests found
......@@ -211,3 +211,7 @@ def odsh_has_more_facets(facet, limit=None, exclude_active=False):
if limit is not None and len(facets) > limit:
return True
return False
def odsh_public_url():
return config.get('ckanext.odsh.public_url')
......@@ -288,7 +288,8 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
'presorted_license_options': odsh_helpers.presorted_license_options,
'odsh_tracking_id': odsh_helpers.odsh_tracking_id,
'odsh_tracking_url': odsh_helpers.odsh_tracking_url,
'odsh_has_more_facets': odsh_helpers.odsh_has_more_facets
'odsh_has_more_facets': odsh_helpers.odsh_has_more_facets,
'odsh_public_url': odsh_helpers.odsh_public_url
}
def after_map(self, map):
......
......@@ -28,5 +28,6 @@
</script>
<!-- End Matomo Code -->
{% endblock %}
{% block bodytag %} data-site-root="{{ h.odsh_public_url }}" data-locale-root="{{ h.odsh_public_url }}" {% endblock %}
{% block page %}
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment