Skip to content
Snippets Groups Projects
Commit ed3877ef authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

test linkedinbot

parent 0adf80cc
No related branches found
No related tags found
1 merge request!942render page for linkedin
......@@ -14,6 +14,11 @@ map $http_user_agent $outdated {
"~Chrome/3[0-3]\." 1;
}
map $http_user_agent $prerender {
default 0;
"~*linkedinbot" 1;
}
server {
listen 8080 default_server;
......@@ -33,8 +38,14 @@ server {
#allow 80.14.51.82; # Erasme
#deny all;
location ^~ /actualites/details/ {
proxy_pass http://res-client-service:8080/api/render/;
# prerender news post for linkedin
location ~ ^/actualites/details/(.*)$ {
if ($prerender = 1) {
# For use of proxy_pass within a regular expression location, cf. https://stackoverflow.com/a/53354944
proxy_pass http://res-client-service:8080/api/render/$1;
}
try_files $uri $uri/ /index.html;
}
location /data-grandlyon-cities {
......
......@@ -14,15 +14,26 @@ map $http_user_agent $outdated {
"~Chrome/3[0-3]\." 1;
}
map $http_user_agent $prerender {
default 0;
"~*linkedinbot" 1;
}
server {
listen 8080 default_server;
root /usr/share/nginx/html/;
location ^~ /actualites/details/ {
proxy_pass http://web-app:8080/api/render/;
# prerender news post for linkedin
location ~ ^/actualites/details/(.*)$ {
if ($prerender = 1) {
# For use of proxy_pass within a regular expression location, cf. https://stackoverflow.com/a/53354944
proxy_pass http://172.17.0.1:8030/api/render/$1;
}
try_files $uri $uri/ /index.html;
}
location /data-grandlyon-cities {
proxy_pass https://data.grandlyon.com/fr/datapusher/ws/grandlyon/adr_voie_lieu.adrcomgl/all.json;
}
......
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