Welcome! Log In Create A New Profile

Advanced

add_before_body

Posted by [email protected] 
add_before_body
March 07, 2018 05:30AM
I can't get the add_before_body feature to work. I have verified the
module is installed.

Here is what I am trying to accomplish. I want to add the following
lines to the header of every html file:
------------------------
<link rel="apple-touch-icon" sizes="180x180"
href="/apple-touch-icon.png"> <link rel="icon" type="image/png"
sizes="32x32" href="/favicon-32x32.png"> <link rel="icon"
type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link
rel="manifest" href="/site.webmanifest"> <link rel="mask-icon"
href="/safari-pinned-tab.svg" color="#5bbad5"> <meta
name="msapplication-TileColor" content="#da532c"> <meta
name="theme-color" content="#ffffff">
--------------------------------------------------
This is supposed to satisfy all browser requests for favicon, tablet
icons, etc.

I have these lines in a file named "before" and that file is located in
the web root.

This is how I implemented the feature:
---------
location / {
root /usr/share/nginx/html/example.com/public_html;
add_before_body /before;
index index.html index.htm;
}
--------------------------------------------

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login