-
Notifications
You must be signed in to change notification settings - Fork 26
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
SLING-9174: Added the code for enhancement #14
base: master
Are you sure you want to change the base?
SLING-9174: Added the code for enhancement #14
Conversation
@@ -166,8 +167,22 @@ private String getUrl(Configuration config, SlingHttpServletRequest request) { | |||
private String buildUrl(Configuration config, SlingHttpServletRequest request) { | |||
final Resource resource = request.getResource(); | |||
|
|||
// The below code gets the path to the XF and then passes it to the buildUrl method | |||
// so that the path to the component is replaced with path to the XF | |||
ValueMap vm = resource.adaptTo(ValueMap.class); |
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 would base the code on the resource type rather than the existence of a property.
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.
Do we need to check for resource type because its already checked before it comes to buildUrl method based on the configuration added in resource-types OSGi config
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.
Yes - but this code is going to run for all configured resource types.
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.
So within the config you can configure multiple resource types and then enable option to rewrite content path instead of component path. So this will be enabled for all configured resource types...
If there was a 1:1 mapping then we would verify for which resourcetype path rewrite is enabled... Does that make sense?
SonarCloud Quality Gate failed.
|
@toniedzwiedz - would be great to have your input as well |
SonarCloud Quality Gate failed.
|
SonarCloud Quality Gate failed. |
Enhancement: https://issues.apache.org/jira/browse/SLING-9174