File tree 3 files changed +12
-2
lines changed
modules/distribution/product/src/main
resources/conf/templates/repository/conf/tomcat/carbon/WEB-INF
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 93
93
94
94
if (userName .value ) {
95
95
let contextPath = " <%= proxyContextPath % >"
96
+ let loginRequestPath = " <%= loginContextRequestUrl % >"
96
97
if (contextPath !== " " ) {
97
98
contextPath = contextPath .startsWith (' /' ) ? contextPath : " /" + contextPath
98
99
contextPath = contextPath .endsWith (' /' ) ?
99
100
contextPath .substring (0 , contextPath .length - 1 ) : contextPath
101
+ loginRequestPath = loginRequestPath .startsWith (' ../' ) ? loginRequestPath .substring (2 , loginRequestPath .length ) : loginRequestPath
100
102
}
101
103
$ .ajax ({
102
104
type: " GET" ,
103
- url: contextPath + " <%= loginContextRequestUrl % > " ,
105
+ url: contextPath + loginRequestPath ,
104
106
xhrFields: { withCredentials: true },
105
107
success : function (data ) {
106
108
if (data && data .status == ' redirect' && data .redirectUrl && data .redirectUrl .length > 0 ) {
Original file line number Diff line number Diff line change 501
501
<script >
502
502
function checkSessionKey () {
503
503
var proxyPath = " <%= contextPath % >"
504
+ let loginRequestPath = " <%= loginContextRequestUrl % >"
505
+ if (proxyPath !== " " ) {
506
+ loginRequestPath = loginRequestPath .startsWith (' ../' ) ? loginRequestPath .substring (2 , loginRequestPath .length ) : loginRequestPath
507
+ }
504
508
$ .ajax ({
505
509
type: " GET" ,
506
- url: proxyPath + " <%= loginContextRequestUrl % > " ,
510
+ url: proxyPath + loginRequestPath ,
507
511
xhrFields: { withCredentials: true },
508
512
success : function (data ) {
509
513
if (data && data .status == ' redirect' && data .redirectUrl && data .redirectUrl .length > 0 ) {
Original file line number Diff line number Diff line change 26
26
<param-name >Owasp.CsrfGuard.Config</param-name >
27
27
<param-value >repository/conf/security/Owasp.CsrfGuard.Carbon.properties</param-value >
28
28
</context-param >
29
+ <context-param >
30
+ <param-name >contextPath</param-name >
31
+ <param-value >{{server.proxy_context_path}}</param-value >
32
+ </context-param >
29
33
30
34
<servlet id =" bridge" >
31
35
<servlet-name >bridgeservlet</servlet-name >
You can’t perform that action at this time.
0 commit comments