Skip to content

How does one get a protected spec in Swagger UI? #2716

Answered by wolfgangwalther
dnk8n asked this question in Q&A
Discussion options

You must be logged in to vote

What I do in one of my projects in this case: I add an already-authorized api endpoint via nginx reverse proxy (just in the development environment, ofc). Something like:

  location /apiwithtoken/ {
    proxy_pass http://postgrest/;
    proxy_http_version 1.1;
    proxy_set_header Authorization "Bearer <hand-crafted-token-without-expiry>";
  }

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants