File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,22 @@ api_platform:
3
3
version : 1.0.0
4
4
# Mercure integration, remove if unwanted
5
5
mercure : ~
6
- http_cache :
7
- public : true
8
- invalidation :
9
- enabled : true
10
- purger : ' api_platform.http_cache.purger.souin'
11
- urls : ['%env(SOUIN_API_URL)%']
12
6
# Good defaults for REST APIs
13
7
defaults :
14
8
stateless : true
15
9
cache_headers :
16
10
max_age : 0
17
- shared_max_age : 3600
18
11
vary : ['Content-Type', 'Authorization', 'Origin']
19
12
extra_properties :
20
13
standard_put : true
14
+
15
+ when@prod :
16
+ defaults :
17
+ cache_headers :
18
+ shared_max_age : 3600
19
+ http_cache :
20
+ public : true
21
+ invalidation :
22
+ enabled : true
23
+ purger : ' api_platform.http_cache.purger.souin'
24
+ urls : ['%env(SOUIN_API_URL)%']
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ services:
23
23
MERCURE_PUBLISHER_JWT_KEY : ${CADDY_MERCURE_JWT_SECRET}
24
24
MERCURE_SUBSCRIBER_JWT_KEY : ${CADDY_MERCURE_JWT_SECRET}
25
25
CADDY_GLOBAL_OPTIONS : |
26
- order cache before rewrite
27
- cache {
28
- api {
29
- souin
30
- }
31
- }
26
+ order cache before rewrite
27
+ cache {
28
+ api {
29
+ souin
30
+ }
31
+ }
32
32
33
33
database :
34
34
environment :
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ services:
37
37
MERCURE_PUBLISHER_JWT_KEY : ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
38
38
MERCURE_SUBSCRIBER_JWT_KEY : ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!}
39
39
CADDY_GLOBAL_OPTIONS : |
40
- order cache before rewrite
41
- cache {
42
- api {
43
- souin
44
- }
45
- }
40
+ order cache before rewrite
41
+ cache {
42
+ api {
43
+ souin
44
+ }
45
+ }
46
46
restart : unless-stopped
47
47
volumes :
48
48
- php_socket:/var/run/php
You can’t perform that action at this time.
0 commit comments