Can Full URL Path Be Added to ToC Links?
-
Hey Guys!
We were running the site through some security tools and received the following warning:
`Importance of Protocol Relative Resource Links
===Protocol relative syntax has become relatively common over the last few years, as HTTPS adoption has spread, as it conveniently eliminates the need for developers to construct URLs based on the user’s current security context. If this syntax is used on an HTTP page to include something from a CDN, it retrieves the HTTP version. If the user uses it on an HTTPS page, it retrieves the HTTPS version.
However, allowing the snippet to request over HTTP opens the door for attacks like the Github Man-on-the-side attack. It’s always safe to request HTTPS assets even if your site is on HTTP, however, the reverse is not true.
Example of Protocol Relative URL
—<img src=”//image/1.png”>;
The Solution
—Use the absolute URLs within the source and target attributes.
<img src=”https://www.example.com/image/1.png”>`
However, we noticed that the Terms of Contents links come through strictly as anchor tags. So the only link we get in the ToC is #examplelink.
Is there a way that we can force the ToC to pull in the full URL of all those links, so for example all of the URL’s would be https://oursite.com/#examplelink?
Thanks so much!
-Simon
- The topic ‘Can Full URL Path Be Added to ToC Links?’ is closed to new replies.