You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Will Norris <wi...@willnorris.com> on 2007/11/28 03:46:16 UTC

protecting assets

surely I'm missing something here.  If all assets on the classpath are  
accessible via /assets/, then how do I protect my configuration  
files?  Running my app with mvn jetty:run lets me access <http://localhost/assets/hibernate.cfg.xml 
 >

thanks,
will

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: protecting assets

Posted by Howard Lewis Ship <hl...@gmail.com>.
Contributions to the ResourceDigestGenerator service can be used to
protect assets.

This is in TapestryModule:

    public static void
contributeResourceDigestGenerator(Configuration<String> configuration)
    {
        // Java class files always require a digest.
        configuration.add("class");

        // Likewise, we don't want people fishing for templates.
        configuration.add(InternalConstants.TEMPLATE_EXTENSION);
    }

The implementation isn't very good however, it only can look at the
simple file extension ".xml" not the relevant one ".hbm.xml".

On Nov 27, 2007 6:46 PM, Will Norris <wi...@willnorris.com> wrote:
> surely I'm missing something here.  If all assets on the classpath are
> accessible via /assets/, then how do I protect my configuration
> files?  Running my app with mvn jetty:run lets me access <http://localhost/assets/hibernate.cfg.xml
>  >
>
> thanks,
> will
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org