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

Is the protected path (default: ows/proxy) expected to be configurable in the future? #36

Closed
fderue opened this issue Mar 9, 2018 · 4 comments
Milestone

Comments

@fderue
Copy link
Contributor

fderue commented Mar 9, 2018

if parsed_url.path.startswith("/ows/proxy"):

It is currently set to "ows/proxy" so the function "utils.parse_service_name(url)" is working but if we have a different protected_path, it won't. So may I suggest to have something more like:

def parse_service_name(url, protected_path):
    parsed_url = urlparse(url)
    service_name = None
    if parsed_url.path.startswith(protected_path):
        parts_without_protected_path = parsed_url.path[len(protected_path)::].strip('/').split('/')
        if len(parts_without_protected_path) > 0:
            service_name = parts_without_protected_path[0]
    if not service_name:
        raise ServiceNotFound
    return service_name
@cehbrecht
Copy link
Member

Making the "protected path" configurable is better than having it hard-coded.

What you like to make a PR?

To configure it you need to update the buildout.cfg and the twitcher.ini template:

@fderue
Copy link
Contributor Author

fderue commented Mar 13, 2018

Ok I will make a PR, should I do it directly to the master branch or to pingudev?

@cehbrecht
Copy link
Member

... PR to master branch. Thanks :)

@cehbrecht cehbrecht added this to the 0.4.0 milestone Mar 14, 2018
@cehbrecht
Copy link
Member

Fixed by PR #37.

fmigneault pushed a commit to Ouranosinc/twitcher that referenced this issue Dec 3, 2018
…m_fixes to dynamic-wps-processes

* commit '0e62e133cca1e1e092435d0fdc41620d2a7c544a':
  Raise an internal server error if a new job status is unavailbale after max_retry seconds
  Return only from execute request when job status is available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants