Permalink
Browse files

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 e6e5edde29babf617e3425dc54ef2322acf980be
Showing with 3 additions and 2 deletions.
  1. +3 −2 restx-core/src/main/java/restx/ResourcesRoute.java
@@ -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;
@@ -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 {
/**

0 comments on commit e6e5edd

Please sign in to comment.