Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layerspecific additional whitlisted urlparams not found in caps #1072

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

DenverCoder544
Copy link
Contributor

Some layers require apikeys or referers or whatnot to function, and those did not get added in printservice.

This solution is based on paikkis and one provider specifically, so the whitelist probably should reside somewhere else than hardcoded here and in paikkis' case we might also consider a few other whitelisted params as well.

@@ -201,6 +211,43 @@ private LayerCapabilitiesWMTS getLayerCapabilities() throws IllegalArgumentExcep
throw new IllegalArgumentException("Could not find layer from Capabilities");
}

private String getLayerAdditionalRequestParams() {
String[] layerUrlParams = layer.getOskariLayer().getUrl().split("\\?");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OskariLayer has getParams(). We should have the apikey there instead of parsing it from the URL. Also IOHelper has bunch of methods parsing and constructing URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants