Postgrest: Disable OpenAPI interface

Created on 13 Feb 2017  路  6Comments  路  Source: PostgREST/postgrest

Is't possible to disable OpenAPI in PostgREST configuration file?

Most helpful comment

A slight correction to what I said. If you remove access for a given role to read a table/function/etc then that object will not appear in OpenAPI output.

All 6 comments

Alternatively, Nginx could do it, but i don't know how to describe Location to disable root access.

maybe like this (didn't try)

location ^~ /[a-z]+ {
  ....
}

Hey guys, I'm newcomer.
And this issues very urgent for our product now.
it's expose everything in root path.
So anyway to disable OpenAPI until now?
Many thanks for support!

@giangstrider you control access to / through nginx that you put in front of postgrest

@giangstrider also remember that even if openapi shows the endpoints, you can control people's access to each of them using postgresql role permissions.

A slight correction to what I said. If you remove access for a given role to read a table/function/etc then that object will not appear in OpenAPI output.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qjhart picture qjhart  路  4Comments

begriffs picture begriffs  路  5Comments

saltukalakus picture saltukalakus  路  4Comments

NickEmpetvee picture NickEmpetvee  路  4Comments

kishyr picture kishyr  路  3Comments