I'm on bolt 3.2 and used this configuration for the nginx but jsonapi routes don't work. I guess I should set the nginx location for the /api. How should it be?
jsonapi configuration:
# Default configuration file for the JSON API extension.
# List the contenttypes that are to be served through the JSON extension.
# Only contenttypes listed here will be served; for any other contenttype,
# the API will return errors.
contenttypes:
projects:
where-clause:
status: 'published'
order: -datepublish
posts:
where-clause:
status: 'published'
order: -datepublish
thumbnail:
width: 400
height: 300
headers:
'Access-Control-Allow-Origin': '*'
'Content-Type': 'application/vnd.api+json'
replacements:
'src="//': 'src="http://'
'href="//': 'href="http://'
# The base url where the API is accessible.
base: '/api'
# If you set this to 'true', all datetime fields will be formatted as ISO 8601 dates
date-iso-8601: true
# See http://php.net/manual/en/json.constants.php
# Some recommended options:
# - 0 for no options (recommended for production)
# - 128 for pretty print (recommended for testing/development)
jsonoptions: 0
It seems that my issue was regarding the routing I was trying. When I go /api/projects it works. Shouldn't /api return some kind of answer like status ok for example?
I'm on
bolt 3.2
and used this configuration for thenginx
butjsonapi
routes don't work. I guess I should set thenginx
location for the/api
. How should it be?jsonapi
configuration: