-
Notifications
You must be signed in to change notification settings - Fork 146
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
redirect to container #621
base: main
Are you sure you want to change the base?
Conversation
let baseUrl = options.original.value | ||
const isContainer = kb.any(options.original, null, ns.ldp('Container')) | ||
console.log('@@ isContainer ' + isContainer) | ||
if (isContainer && !baseUrl.endsWith('/')) baseUrl = baseUrl + '/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the proper way to solve this problem, what if the redirect goes to a different path altogether (for whatever reason)? We should be reading from the response.url
instead. And if we don't consider redirecting to a completely different resource a valid situation, throw an error rather than keep going with potentially wrong data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I was on your line but that was conflicting with the point raised by @timbl that there was (may have been) a proxy related reason not to use the response.url
No description provided.