Skip to content

Instantly share code, notes, and snippets.

@dadamssg
Created July 8, 2014 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadamssg/a4f2784267f893ef9114 to your computer and use it in GitHub Desktop.
Save dadamssg/a4f2784267f893ef9114 to your computer and use it in GitHub Desktop.
fos_rest:
routing_loader:
default_format: json
include_format: false
view:
formats:
json: true
body_listener: true
format_listener:
rules:
- { path: ^/api, priorities: ['json'], fallback_format: json, prefer_extension: false }
disable_csrf_role: ROLE_API
exception:
codes:
'Symfony\Component\Routing\Exception\ResourceNotFoundException': 404
'Doctrine\ORM\OptimisticLockException': HTTP_CONFLICT
messages:
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException': true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment