[
https://issues.apache.org/jira/browse/TAP5-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795936#action_12795936
]
Robert Zeigler commented on TAP5-963:
-------------------------------------
As a matter of fact, I can.
I have apps with images & css files that are supposed to be accessible only by
one set of users or another, based on an affiliated site/location.
I prefer it if the framework doesn't dictate to me what it thinks should be
accessible from the classpath. ;)
But I appear to be in the minority on this issue, so I'll contribute my own
asset path analyzer ahead of regex analyzer to restrict those paths and make
things easier for the majority of users that prefer images and css files under
app to be accessible by default.
Cheers,
Robert
> Allow access to static resources (css, js, jpg, jpeg, png, gif) inside the
> app package
> --------------------------------------------------------------------------------------
>
> Key: TAP5-963
> URL: https://issues.apache.org/jira/browse/TAP5-963
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.1.0.6
> Reporter: Igor Drobiazko
> Assignee: Igor Drobiazko
> Fix For: 5.2.0, 5.1.0.7
>
>
> Following should be sufficient:
> - add a contribution like:
> public void contributeRegexAuthorizer(
> final Configuration<String> regex,
> @Symbol(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM) final
> String appPackageName) {
> final String pattern =
> "([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif))$";
> regex.add("^" + appPackageName.replace(".", "/") + "/" + pattern);
> }
> - document how to make further resources accessible (e.g. outside the app
> package)
> - document how to override asset protection defaults
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.