File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -229,23 +229,16 @@ <h2 id="usage">Usage</h2>
229229</ blockquote >
230230< pre class ="highlight tab tab-sh "> < code > curl -X GET http://localhost:1337/ \
231231 -H < span class ="hljs-string "> 'Content-Type: application/json'</ span > \
232- -H < span class ="hljs-string "> 'pg: {}' </ span > < span class =" hljs-comment " > # see Postgres connection header below </ span >
232+ -H < span class ="hljs-string "> 'X-Connection-Encrypted: ENCRYPTED_STRING' </ span >
233233</ code > </ pre >
234234< pre class ="highlight tab tab-js "> < code > < span class ="hljs-keyword "> const</ span > data = < span class ="hljs-keyword "> await</ span > fetch(< span class ="hljs-string "> 'http://localhost:1337'</ span > , {
235235 < span class ="hljs-attr "> method</ span > : < span class ="hljs-string "> 'GET'</ span > ,
236236 < span class ="hljs-attr "> headers</ span > : {
237237 < span class ="hljs-string "> 'Content-Type'</ span > : < span class ="hljs-string "> 'application/json'</ span > ,
238- < span class ="hljs-string "> 'pg '</ span > : {} < span class ="hljs-comment " > // see Postgres connection header below </ span >
238+ < span class ="hljs-string "> 'X-Connection-Encrypted '</ span > : < span class ="hljs-string " > 'ENCRYPTED_STRING' </ span >
239239 }
240240})
241241</ code > </ pre >
242- < blockquote >
243- < p > Postgres connection header</ p >
244- </ blockquote >
245- < pre class ="highlight tab tab-json "> < code > {
246- < span class ="hljs-attr "> "X-Connection-Encrypted"</ span > : < span class ="hljs-string "> "ENCRYPTED_CONNECTION_STRING"</ span >
247- }
248- </ code > </ pre >
249242< p > For security reasons, this API is best self-hosted and set up with ENV_VARS with the default connection string.</ p >
250243< p > If you want to use this with multiple Postgres instances, you can pass the connection string as a header but it must be encrypted.</ p >
251244< h2 id ="self-hosting "> Self Hosting</ h2 >
You can’t perform that action at this time.
0 commit comments