-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Request object should provide original url after url re-writing #80485
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
@thomheymann I didn't find
'x-forwarded-for': '127.0.0.1',
'x-forwarded-port': '60666',
'x-forwarded-proto': 'http',
'x-forwarded-host': 'localhost:5601',
|
I don't know for sure what the platform APIs allow you to rewrite but if plugin developers can only change the pathname, then that is all I need to get the original url. Do the query params stay intact if a plugin rewrites the pathname? I get that adding a headers is a good approach if an external system does the url rewriting but think that if it's Kibana itself I'd prefer if that would be exposed on the url/request object itself. You've got much more context though so happy to go with your suggestion. |
No, a plugin passes the final URL, therefore, it might change any part of it, including
I don't want to add a custom property to URL object. Adding to KibanaRequest object sounds acceptable. |
Kibana Platform allows plugins to rewrite URL with
onPreRouting
interceptor.kibana/src/core/server/http/lifecycle/on_pre_routing.ts
Line 50 in 0ea414c
There is no way to get the original url at the moment. The platform should support this case - otherwise, plugins have to implement error-prone workarounds #74640 (comment)
The text was updated successfully, but these errors were encountered: