24
24
import eu .openanalytics .containerproxy .auth .IAuthenticationBackend ;
25
25
import eu .openanalytics .containerproxy .auth .UserLogoutHandler ;
26
26
import eu .openanalytics .containerproxy .auth .impl .OpenIDAuthenticationBackend ;
27
+ import eu .openanalytics .containerproxy .service .IdentifierService ;
27
28
import eu .openanalytics .containerproxy .util .AppRecoveryFilter ;
28
29
import eu .openanalytics .containerproxy .util .EnvironmentUtils ;
29
30
import eu .openanalytics .containerproxy .util .OverridingHeaderWriter ;
@@ -93,6 +94,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
93
94
94
95
@ Inject
95
96
private AppRecoveryFilter appRecoveryFilter ;
97
+
98
+ @ Inject
99
+ private IdentifierService identifierService ;
96
100
97
101
@ Autowired (required =false )
98
102
private List <ICustomSecurityConfig > customConfigs ;
@@ -108,13 +112,6 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
108
112
109
113
@ Override
110
114
public void configure (WebSecurity web ) {
111
- // web
112
- // .ignoring().antMatchers("/css/**").and()
113
- // .ignoring().antMatchers("/img/**").and()
114
- // .ignoring().antMatchers("/js/**").and()
115
- // .ignoring().antMatchers("/assets/**").and()
116
- // .ignoring().antMatchers("/webjars/**").and();
117
- //
118
115
if (customConfigs != null ) {
119
116
for (ICustomSecurityConfig cfg : customConfigs ) {
120
117
try {
@@ -225,7 +222,13 @@ public void handle(HttpServletRequest request, HttpServletResponse response, Acc
225
222
if (auth .hasAuthorization ()) {
226
223
http .authorizeRequests ().antMatchers (
227
224
"/login" , "/signin/**" , "/auth-error" , "/error" , "/app-access-denied" , "/logout-success" ,
228
- "/favicon.ico" , "/css/**" , "/img/**" , "/js/**" , "/assets/**" , "/webjars/**" ).permitAll ();
225
+ "/favicon.ico" ,
226
+ "/" + identifierService .instanceId + "/css/**" , "/css/**" ,
227
+ "/" + identifierService .instanceId + "/img/**" , "/img/**" ,
228
+ "/" + identifierService .instanceId + "/js/**" , "/js/**" ,
229
+ "/" + identifierService .instanceId + "/assets/**" , "/assets/**" ,
230
+ "/" + identifierService .instanceId + "/webjars/**" , "/webjars/**"
231
+ ).permitAll ();
229
232
http
230
233
.formLogin ()
231
234
.loginPage ("/login" )
0 commit comments