Mercurial > dive4elements > framework
changeset 266:c42a07be9aee
Jetty HTTP server: Do not bind context to restlet app for security reasons.
artifacts/trunk@1977 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 23 May 2011 10:04:31 +0000 |
parents | d52947ce8629 |
children | 72de5c373c9b |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/rest/JettyServer.java |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 23 09:56:15 2011 +0000 +++ b/ChangeLog Mon May 23 10:04:31 2011 +0000 @@ -1,3 +1,8 @@ +2011-04-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/JettyServer.java: + Do not bind context to restlet app for security reasons. + 2011-04-23 Sascha L. Teichmann <sascha.teichmann@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/JettyServer.java Mon May 23 09:56:15 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/JettyServer.java Mon May 23 10:04:31 2011 +0000 @@ -19,18 +19,20 @@ Component component = new Component(); - RestApp app = new RestApp(component.getContext(), db); + RestApp app = new RestApp(db); Server server = createServer(); + // TODO: Do more sophisticated Jetty server configuration here. + component.getServers().add(server); + component.getDefaultHost().attach(app); + logServerStart(); HttpServerHelper serverHelper = new HttpServerHelper(server); - // TODO: Do more sophisticated Jetty server configuration here. - try { serverHelper.start(); }