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

pss.origin directive URL doesn't support API endpoints #2068

Open
jhiemstrawisc opened this issue Aug 2, 2023 · 2 comments
Open

pss.origin directive URL doesn't support API endpoints #2068

jhiemstrawisc opened this issue Aug 2, 2023 · 2 comments
Assignees

Comments

@jhiemstrawisc
Copy link

jhiemstrawisc commented Aug 2, 2023

I'm working on a new redirector service that can detect whether it should redirect to a cache or an origin, and I've broken those two endpoints out at /api/v1.0/director/origin and /api/v1.0/director/object, respectively. However, in my testing cache, when I try to set pss.origin <redirector-domain>:443/api/v1.0/director/origin, xrootd fails to initialize with the error:
badly formed origin URL (error in source code is here)

Is it possible to make parsing the redirector URL a little more flexible so something like this can work?

@abh3
Copy link
Member

abh3 commented Aug 3, 2023

The problem here is that the code doesn't know what to do with the "path" argument. So, what is it that the origin URL is really supposed to do? That is, what is the expected final URL supposed to look like given the example?

@abh3 abh3 self-assigned this Aug 3, 2023
@jhiemstrawisc
Copy link
Author

In our case, yes, the final URL would have that form. The intention is that our redirector service has the ability to redirect clients to either caches or origins. A GET request to <redirector-domain>:443/api/v1.0/director/origin/foo/bar should redirect the client to <origin-domain>:1094/foo/bar, whereas a GET request to <redirector-domain>:443/api/v1.0/director/object/foo/bar should redirect to <cache-domain:>8443/foo/bar. The redirector knows what kind of redirection to serve based on the endpoint. I think all we would need is for the path to be appended.

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