%@ page errorPage="error.jsp" %>
<%@ include file="/portal/include/include_java.jsp" %>
<%@ page import="com.appiancorp.security.cors.CorsUtil"%>
<%@ page import="com.appiancorp.suite.cfg.ConfigurationFactory"%>
<%@ page import="com.appiancorp.security.auth.UserAgent"%>
<%@ page import="com.appiancorp.suite.cfg.MobileConfiguration"%>
<%@ page import="com.appiancorp.ap2.Constants"%>
<%@ page import="com.google.common.base.Strings"%>
<%
if (!CorsUtil.isAllowedOriginOrReferrer(request)) {
response.setHeader("X-Frame-Options", "SAMEORIGIN");
}
MobileConfiguration mobileConfig = ConfigurationFactory.getConfiguration(MobileConfiguration.class);
UserAgent userAgent = new UserAgent(request.getHeader(Constants.USER_AGENT));
if (userAgent.isAndroidMobileBrowser()) {
pageContext.setAttribute("appDownloadLink", mobileConfig.getAndroidAppLink());
pageContext.setAttribute("appDownloadKey", "downloadAndroid");
} else {
pageContext.setAttribute("appDownloadLink", mobileConfig.getIOSAppLink());
pageContext.setAttribute("appDownloadKey", "downloadIOS");
}
%>