Repository navigation
Is there any way to reach the Window: localStorage property? #4583
|
Is there any way to access the HTML Web Storage API from PostgREST? Something like this (pseudo code): |
Answered by
laurenceisla
Dec 29, 2025
Replies: 1 comment 2 replies
|
Not sure if I understood your question, but PostGREST works server side and does not access anything from the web page. You'd need to send it in a request for PostgREST to be aware of it, e.g. in a header (and access it with settings) or as parameters in functions. Or are you using PostgREST to return JS code from a table or function? If so then yes, it should be able to do that (just be sure to sanitize the way that code is added to the database if required). |
2 replies
Answer selected by
wolfgangwalther
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if I understood your question, but PostGREST works server side and does not access anything from the web page. You'd need to send it in a request for PostgREST to be aware of it, e.g. in a header (and access it with settings) or as parameters in functions.
Or are you using PostgREST to return JS code from a table or function? If so then yes, it should be able to do that (just be sure to sanitize the way that code is added to the database if required).