Skip to content

Commit 1a5f077

Browse files
author
Brijesh
committed
Caddy order templates before encode
1 parent 8f7b28c commit 1a5f077

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

Caddyfile

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
2+
order templates before encode
23
auto_https off
34
}
4-
:2015
5-
6-
root * /srv
7-
file_server
8-
9-
10-
log {
11-
level INFO
12-
}
13-
encode gzip
14-
try_files {path} /index.html
15-
templates /static/js/* {
16-
mime application/javascript
17-
}
18-
19-
header /service-worker.js {
20-
Cache-Control max-age=0,no-cache,no-store,must-revalidate
21-
}
22-
23-
header /index.html {
24-
Cache-Control max-age=0,no-cache,no-store,must-revalidate
25-
}
26-
27-
header /static/* {
28-
Cache-Control max-age=604800,public
29-
}
30-
31-
header /images/* {
32-
Cache-Control max-age=604800,public
33-
}
34-
35-
header /manifest.json {
36-
Cache-Control max-age=3600
5+
:2015 {
6+
root * /srv
7+
log {
8+
level DEBUG
9+
}
10+
templates /static/js/* {
11+
between [[! !]]
12+
mime application/javascript text/javascript
13+
}
14+
15+
encode gzip
16+
try_files {path} /index.html
17+
file_server
18+
header /service-worker.js {
19+
Cache-Control max-age=0,no-cache,no-store,must-revalidate
20+
}
21+
22+
header /index.html {
23+
Cache-Control max-age=0,no-cache,no-store,must-revalidate
24+
}
25+
26+
header /static/* {
27+
Cache-Control max-age=604800,public
28+
}
29+
30+
header /images/* {
31+
Cache-Control max-age=604800,public
32+
}
33+
34+
header /manifest.json {
35+
Cache-Control max-age=3600
36+
}
3737
}

src/constants/api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export const DEV_ENV = {
3333
};
3434

3535
export const SSO_BASE_URL = isBundled
36-
? '{{env "SSO_BASE_URL"}}' // Caddy will replace this with the environment variable configured in Openshift
36+
? '[[! env "SSO_BASE_URL" !]]' // Caddy will replace this with the environment variable configured in Openshift
3737
: DEV_ENV.SSO_BASE_URL;
3838

39-
export const SSO_REALM_NAME = isBundled ? '{{env "SSO_REALM_NAME"}}' : process.env.REACT_APP_SSO_REALM_NAME;
40-
export const SSO_CLIENT_ID = isBundled ? '{{env "SSO_CLIENT_ID"}}' : process.env.REACT_APP_SSO_CLIENT_ID;
39+
export const SSO_REALM_NAME = isBundled ? '[[! env "SSO_REALM_NAME" !]]' : process.env.REACT_APP_SSO_REALM_NAME;
40+
export const SSO_CLIENT_ID = isBundled ? '[[! env "SSO_CLIENT_ID" !]]' : process.env.REACT_APP_SSO_CLIENT_ID;
4141
export const SSO_BASE_AUTH_ENDPOINT = `${SSO_BASE_URL}/auth/realms/${SSO_REALM_NAME}/protocol/openid-connect`;
4242
export const SSO_LOGIN_REDIRECT_URI = `${window.location.origin}/return-page?type=${RETURN_PAGE_TYPE.LOGIN}`;
4343
export const SSO_LOGIN_ENDPOINT = `${SSO_BASE_AUTH_ENDPOINT}/auth?response_type=code&client_id=${SSO_CLIENT_ID}&redirect_uri=${SSO_LOGIN_REDIRECT_URI}&code_challenge_method=S256&code_challenge=_CODE_CHALLENGE_VALUE_`;
@@ -50,7 +50,7 @@ export const SSO_LOGOUT_ENDPOINT =
5050
encodeURIComponent(SSO_LOGOUT_REDIRECT_URI) +
5151
`&client_id=${SSO_CLIENT_ID}`;
5252

53-
export const SITEMINDER_BASE_URL = isBundled ? '{{env "SITEMINDER_BASE_URL"}}' : DEV_ENV.SITEMINDER_BASE_URL;
53+
export const SITEMINDER_BASE_URL = isBundled ? '[[! env "SITEMINDER_BASE_URL" !]]' : DEV_ENV.SITEMINDER_BASE_URL;
5454

5555
export const SITEMINDER_LOGOUT_REDIRECT_URI = `${window.location.origin}/return-page?type=${RETURN_PAGE_TYPE.SITEMINDER_LOGOUT}`;
5656
export const SITEMINDER_LOGOUT_ENDPOINT =

0 commit comments

Comments
 (0)