Skip to content
Snippets Groups Projects
dev.conf 1.13 KiB
Newer Older
  • Learn to ignore specific revisions
  • Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    upstream api_node_js {
    	server	service-ram:3000;
    }
    
    server {
      listen 8080 default_server;
    
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      root /usr/share/nginx/html;
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      index index.html;
    
    
      location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
        try_files $uri $uri/ $uri/index.html @backend;
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      location @backend {
        rewrite /api/?(.*) /$1 break;
        proxy_pass http://api_node_js;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_set_header   X-Real-IP         $remote_addr;
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      }
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      location /base-adresse/base-adresse-nationale/streets {
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
        proxy_pass https://passerelle.formulaireextranet.grandlyon.com/base-adresse/base-adresse-nationale/streets;
      }
    
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      location /geocoding/photon/api {
        proxy_pass https://download.data.grandlyon.com/geocoding/photon/api;
      }
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    
    
      location /reverse {
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
        proxy_pass https://api-adresse.data.gouv.fr/reverse;
      }
    
    
      location /wfs/grandlyon {
        proxy_pass https://download.data.grandlyon.com/wfs/grandlyon;
      }
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    
      # REALLY important for JavaScript modules (type="module") to work as expected!!!
      location ~ \.js {
        add_header  Content-Type   text/javascript;
      }