Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc - Better ResourcesRoute example as the previous one was suggestin…
…g a security flaw

This fixes #253
  • Loading branch information
fcamblor committed Aug 21, 2017
1 parent 2c0fbbd commit e6e5edd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions restx-core/src/main/java/restx/ResourcesRoute.java
Expand Up @@ -4,7 +4,6 @@
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.ByteStreams;
import com.google.common.io.Resources;
import restx.common.MoreResources;
import restx.http.HTTP;
Expand All @@ -22,7 +21,9 @@
* Resources route allows to serves files from the classpath.
*
* Example:
* <pre>new ResourcesRoute("myResources", "/")</pre>
* <pre>new ResourcesRoute("myResources", "web", "static")</pre>
* We will consider every urls matching /web/* will serve files into 'static' classpath's directory
* For instance, /web/foo/bar.json URL will serve classpath:static/foo/bar.json
*/
public class ResourcesRoute implements RestxRoute, RestxHandler {
/**
Expand Down

0 comments on commit e6e5edd

Please sign in to comment.