Skip to content
Snippets Groups Projects
Commit 34fdcc10 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix: nginx conf + build

parent 8c11b972
No related branches found
No related tags found
1 merge request!11Recette
......@@ -61,7 +61,7 @@
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"buildOptimizer": false,
"budgets": [
{
"type": "initial",
......
server {
listen 8080 default_server;
root /usr/share/nginx/html/;
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;
sub_filter '<html lang="en">' '<html lang="fr">';
}
# Rule serving the en build
location /en {
try_files $uri$args /en/index.html;
}
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;
}
# redirecting the /fr url to the new location of the fr build
location ~ ^/fr(.*)$ {
return 301 $scheme://$http_host$1$is_args$args;
}
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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment