This commit is contained in:
Pitchaya Boonsarngsuk
2019-07-05 16:56:10 +01:00
parent c3d3dcbff7
commit 6b6c18c79e
9 changed files with 367 additions and 53 deletions

View File

@@ -9,16 +9,12 @@ api_platform:
mapping:
paths: ['%kernel.project_dir%/src/Entity']
title: Hello API Platform
description: สวัสดีเพื่อนๆ
version: 1.0.0
# Varnish integration, remove if unwanted
http_cache:
invalidation:
enabled: true
varnish_urls: ['%env(VARNISH_URL)%']
max_age: 0
shared_max_age: 3600
vary: ['Content-Type', 'Authorization']
public: true
# Mercure integration, remove if unwanted
mercure:
hub_url: '%env(MERCURE_SUBSCRIBE_URL)%'
show_webby: false
formats:
json: ['application/json']
xml: ['application/xml', 'text/xml']
yaml: ['application/x-yaml']
csv: ['text/csv']
html: ['text/html']

View File

@@ -2,7 +2,7 @@ nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_methods: ['GET', 'OPTIONS']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600