jayendrap commented on code in PR #335: URL: https://github.com/apache/atlas/pull/335#discussion_r2054582423
########## webapp/src/main/java/org/apache/atlas/web/servlets/AtlasHttpServlet.java: ########## @@ -17,34 +17,69 @@ */ package org.apache.atlas.web.servlets; +import org.apache.atlas.ApplicationProperties; +import org.apache.atlas.web.filters.AtlasResponseRequestWrapper; +import org.apache.atlas.web.filters.HeadersUtil; +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConfigurationConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletContext; +import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.Optional; +import java.util.Properties; + public class AtlasHttpServlet extends HttpServlet { public static final Logger LOG = LoggerFactory.getLogger(AtlasHttpServlet.class); - public static final String TEXT_HTML = "text/html"; - public static final String XFRAME_OPTION = "X-Frame-Options"; - public static final String DENY = "DENY"; - public static final String ALLOW = "ALLOW"; + public static final String TEXT_HTML = "text/html"; + public static final String HEADER_CONFIG_KEY = "atlas.headers"; + public static final String ALLOW = "ALLOW"; + + private Configuration configuration; + private Properties headerProperties; + + @Override + public void init() throws ServletException { + try { + configuration = ApplicationProperties.get(); + headerProperties = Optional.ofNullable(configuration) Review Comment: You can use ApplicationProperties.getSubsetAsProperties instead of this code -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@atlas.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org