spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Application Page Not Rendering

Open sandyjohn opened this issue 8 years ago • 4 comments

Springbootadmin application page was not rendering and instead while i loading the application in browser, login file was automatically downloading. Everything was working fine till yesterday but suddenly this issue was occurs.

sandyjohn avatar Sep 05 '18 13:09 sandyjohn

Sorry but I don't understand your problem. Please provide a detailed description of your problem and a project to reproduce the problem.

joshiste avatar Sep 05 '18 14:09 joshiste

I am using SpringbootAdmin as a war application and used the below code. After deploying in tomcat, while loading the application page as localhost:8080/admin/login.html. Application Signin Page was not rendering and instead file named as "login" is downloading.Is that anything in wrong in the below code. I am using springbootadmin version 1.5.4 and the sample war application code from the github only am using but changed the version alone.

@Override protected void configure(HttpSecurity http) throws Exception { /*// @formatter:off SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); successHandler.setTargetUrlParameter("redirectTo"); successHandler.setDefaultTargetUrl(adminContextPath + "/");

        http.authorizeRequests()
            .antMatchers(adminContextPath + "/assets/**").permitAll()
            .antMatchers(adminContextPath + "/login.html").permitAll()
            .anyRequest().authenticated()
            .and()
        .formLogin().loginPage(adminContextPath + "/login.html").successHandler(successHandler).and()
        .logout().logoutUrl(adminContextPath + "/logout").and()
        .httpBasic().and()
        .csrf().disable();

sandyjohn avatar Sep 06 '18 13:09 sandyjohn

Please provide a project to reproduce the problem.

joshiste avatar Sep 06 '18 19:09 joshiste

Despite the fact that the csrf config is wrong (already reported and fixed in the docs with https://github.com/codecentric/spring-boot-admin/issues/894) your sample works perfectly fine for me.

joshiste avatar Sep 10 '18 18:09 joshiste