Skip to content

Commit

Permalink
Merge pull request #12 from kentico-timothyf/master
Browse files Browse the repository at this point in the history
Fixing Canonical Url creation and relaxed domain validation
  • Loading branch information
kentico-timothyf authored Aug 31, 2017
2 parents dd0d623 + 7874134 commit 0125681
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions Kentico.AcceleratedMobilePages/AmpFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private string AppendAmpHtmlLink(string finalHtml)
{
string ampLink = (CMSHttpContext.Current.Request.IsSecureConnection ? Constants.P_HTTPS : Constants.P_HTTP) +
SettingsKeyInfoProvider.GetValue(SiteContext.CurrentSiteName + ".AMPFilterDomainAlias") +
DocumentContext.CurrentAliasPath +
(DocumentContext.CurrentPageInfo.DocumentUrlPath ?? DocumentContext.CurrentAliasPath) +
SettingsKeyInfoProvider.GetValue(SiteContext.CurrentSiteName + ".CMSFriendlyURLExtension");
string metaTag = String.Format(Constants.AMP_AMP_HTML_LINK, ampLink) + Constants.NEW_LINE;
// Insert meta tag
Expand Down Expand Up @@ -235,7 +235,7 @@ private string InsertCompulsoryMarkupAndCss(string finalHtml)

// Create a link pointing to the regular HTML version of the page
string canonicalLink = (CMSHttpContext.Current.Request.IsSecureConnection ? Constants.P_HTTPS : Constants.P_HTTP) +
SiteContext.CurrentSite.DomainName + DocumentContext.CurrentAliasPath +
SiteContext.CurrentSite.DomainName + (DocumentContext.CurrentPageInfo.DocumentUrlPath ?? DocumentContext.CurrentAliasPath) +
SettingsKeyInfoProvider.GetValue(SiteContext.CurrentSiteName + ".CMSFriendlyURLExtension");

// Extend the <head> tag with the compulsory markup and CSS styles
Expand Down

0 comments on commit 0125681

Please sign in to comment.