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
returned response Content-Type is application/json
It seems the browser is setting Accept header to */* and PostgREST does not set proper content type in this case.
As a workaround it is necessary to explicitly set content type in the function using current_setting.
The text was updated successfully, but these errors were encountered:
Sorry, but that's still a bug. The function definition clearly tells us that this function is only ever going to return text/javascript, so we should never choose application/json when the header is */*.
Environment
Description of issue
I have the following function:
When requested by a browser from:
returned response Content-Type is
application/json
It seems the browser is setting Accept header to
*/*
and PostgREST does not set proper content type in this case.As a workaround it is necessary to explicitly set content type in the function using current_setting.
The text was updated successfully, but these errors were encountered: