Skip to content
Snippets Groups Projects
dev.conf 896 B
Newer Older
server {
  listen 8080 default_server;

Hugo SUBTIL's avatar
Hugo SUBTIL committed
  root /usr/share/nginx/html;

  location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ /index.html;
  }

Hugo SUBTIL's avatar
Hugo SUBTIL committed
  location /api {
    rewrite ^/api/(.*) /$1 break;
    proxy_pass http://json-server:3000/api;
  }
  
  # Public api redirect
  location /base-adresse/base-adresse-nationale/streets {
    proxy_pass https://passerelle.formulaireextranet.grandlyon.com/base-adresse/base-adresse-nationale/streets;
  }

  location /geocoding/photon/api {
    proxy_pass https://download.data.grandlyon.com/geocoding/photon/api;
  }
Hugo SUBTIL's avatar
Hugo SUBTIL committed

Hugo SUBTIL's avatar
Hugo SUBTIL committed
   location /reverse {
    proxy_pass https://api-adresse.data.gouv.fr/reverse;
  }


  # REALLY important for JavaScript modules (type="module") to work as expected!!!
  location ~ \.js {
    add_header  Content-Type   text/javascript;
  }