Skip to content

Expose over ssl #2838

Answered by laurenceisla
risedangel asked this question in Q&A
Discussion options

You must be logged in to vote

Hi. If you're using Nginx, for instance, you can adapt the example given in the docs to an https configuration, it would look something like this:

http {
  
  # ...

  # upstream configuration
  upstream postgrest {
    server localhost:3000;
  }

  # ...

  server {

    listen 443 ssl http2;

    # Other configuration for HTTPS
    # ssl_certificate...
    # ssl_certificate_key...
    # etc...

    # expose to the outside world
    location /api/ {
      default_type  application/json;
      proxy_hide_header Content-Location;
      add_header Content-Location  /api/$upstream_http_content_location;
      proxy_set_header  Connection "";
      proxy_http_version 1.1;
      proxy_pass htt…

Replies: 1 comment

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