You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Ben,
we want to introduce a feature where we can render all HTML pages in a certain JSON format. This is realized using a custom route with the normal URL and ".json" at the end. We then generate the JSON with TWIG, set the correct mime type and deliver it. In our current setup Blitz however caches the page like this <whatever.json>/index.html and therefor it is not sent with a JSON mime type anymore.
I found this issue #443 where you wrote a fix, but in my case it has the same behaviour, although we are on a later version. I did not find anything in the docs pointing me in the right direction.
So my questions:
Is it possible to cache my .json requests
If yes, how can I enable it?
Thanks
Plugin Version
4.23.7
The text was updated successfully, but these errors were encountered:
It works as expected in my local tests. Can you please double check that you’ve enabled the cacheNonHtmlResponses config setting?
Keep in mind that if you’re using server rewrites, you may need to configure your web server to set the appropriate content type for URIs ending in .json.
Support Request
Hi Ben,
we want to introduce a feature where we can render all HTML pages in a certain JSON format. This is realized using a custom route with the normal URL and ".json" at the end. We then generate the JSON with TWIG, set the correct mime type and deliver it. In our current setup Blitz however caches the page like this <whatever.json>/index.html and therefor it is not sent with a JSON mime type anymore.
I found this issue #443 where you wrote a fix, but in my case it has the same behaviour, although we are on a later version. I did not find anything in the docs pointing me in the right direction.
So my questions:
Thanks
Plugin Version
4.23.7
The text was updated successfully, but these errors were encountered: