client: set og:url to the request_uri
This commit is contained in:
parent
44d28f3f63
commit
b4851ce32c
2 changed files with 5 additions and 3 deletions
|
@ -22,6 +22,7 @@ end
|
||||||
|
|
||||||
-- Add the site name tag
|
-- Add the site name tag
|
||||||
add_meta_tag("og:site_name", server_info.config.name)
|
add_meta_tag("og:site_name", server_info.config.name)
|
||||||
|
add_meta_tag("og:url", ngx.var.scheme .. "://" .. ngx.var.http_host .. ngx.var.request_uri)
|
||||||
|
|
||||||
local final_response = page_html.body:gsub("{{ generated_head_tags }}", additional_tags)
|
local final_response = page_html.body:gsub("{{ generated_head_tags }}", additional_tags)
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ http {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /var/www;
|
root /var/www;
|
||||||
try_files $uri /_og_tags_html;
|
try_files $uri /_meta_tags_html;
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
|
@ -104,7 +104,8 @@ http {
|
||||||
proxy_pass http://backend/$1;
|
proxy_pass http://backend/$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /_og_tags_html {
|
location /_meta_tags_html {
|
||||||
|
internal;
|
||||||
root /var/www;
|
root /var/www;
|
||||||
content_by_lua_file /etc/nginx/metatags.lua;
|
content_by_lua_file /etc/nginx/metatags.lua;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue