Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
HAWKULAR-441 : Redirect to console index.html only on hawkular-ui* paths
Browse files Browse the repository at this point in the history
Also, move the redirect log to DEBUG level
  • Loading branch information
ammendonca committed Jul 13, 2015
1 parent ba93168 commit e2b84d1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public class PushStateConfigurationProvider extends HttpConfigurationProvider {
public Configuration getConfiguration(final ServletContext context) {
return ConfigurationBuilder.begin()
.addRule()
.when(Direction.isInbound().and(Path.matches("/{path}"))
.andNot(Resource.exists("/{path}"))
.andNot(ServletMapping.includes("/{path}")))
.perform(Log.message(Logger.Level.INFO, "Page not found. This may be due to html5mode routing in " +
"AngularJS application. Falling back to index.html.").and(Forward.to("/index.html")))
.when(Direction.isInbound().and(Path.matches("/hawkular-ui{path}"))
.andNot(Resource.exists("/hawkular-ui{path}"))
.andNot(ServletMapping.includes("/hawkular-ui{path}")))
.perform(Log.message(Logger.Level.DEBUG, "Page not found: /hawkular-ui{path} This may be due to " +
"html5mode routing in AngularJS. Falling back to index.html.").and(Forward.to("/index.html")))
.where("path").matches(".*");
}

Expand Down

0 comments on commit e2b84d1

Please sign in to comment.