4/09/2020

PostgREST "response.headers guc must be a JSON array composed of objects with a single key and a string value" error

Yep. You are wondering why it's working locally and not in production right? Or maybe why PostgREST login feature is not working at all?

The response.headers guc must be a JSON array composed of objects with a single key and a string value is often related to the fact that some call were made to set a header field but the value to be set was empty. Take a look at your settings.secrets table. If it's empty, that's the problem.

At least on the PostgREST-starter-kit, the settings.secrets table should contains at least 2 rows:

jwt_secretyour_secret_here
jwt_lifetime 3600

Looking for some guidance on PostgREST? How to setup a CI/CD with it? What test strategy to use? As a CTO I've built multiple SaaS with it underneath and now help tech teams build fast, reliable and safer API with PostgREST and PostgreSQL. Hire me on CodeMentor or Malt!

« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.