tut-spring-security-and-angular-js icon indicating copy to clipboard operation
tut-spring-security-and-angular-js copied to clipboard

Angular static resource js&css issues

Open towardsfuture opened this issue 7 years ago • 5 comments

While request static js&css(eg. main.js,polyfills.js etc) from ui. The url of main.js is not 'http://localhost:8080/ui/main.js' but 'http://localhost:8080/main.js'.

towardsfuture avatar May 31 '18 16:05 towardsfuture

Correct. Is there a an error in the text somewhere?

dsyer avatar Jul 11 '18 09:07 dsyer

Because the new angular compiled file's name not composed with 'bundle' any more.

towardsfuture avatar Jul 11 '18 15:07 towardsfuture

That seems like a different issue?

dsyer avatar Jul 11 '18 15:07 dsyer

Yes,it cause by the new angular version.

towardsfuture avatar Jul 12 '18 13:07 towardsfuture

Just update the method ignoring static resources from authentication to:

      @Override
   public void configure(WebSecurity web) throws Exception {
       web.ignoring().antMatchers("/favicon.ico",
               "/polyfills.js*",
               "/runtime.js*",
               "/styles.js*",
               "/scripts.js",
               "/main.js*",
               "/vendor.js*"
       );
   }


matohl avatar Oct 09 '18 20:10 matohl