Skip to content

Commit

Permalink
Disable canonical links for now.
Browse files Browse the repository at this point in the history
They seem to interact badly with our Apache redirects, so disable
until we have that fixed.
  • Loading branch information
benmwebb committed Sep 12, 2015
1 parent 472329b commit ce92598
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
5 changes: 1 addition & 4 deletions doc/configfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ service_name

urltop
The URL under which the service's web pages live. This is used to construct
URLs containing job results, for example. This is the 'canonical' URL,
which is usually something like http://salilab.org/modfoo/, as opposed
to the 'real' URL, something like http://modbase.compbio.ucsf.edu/modfoo/.
The former is preferred as it gives cleaner results in search engines.
URLs containing job results, for example.

google_ua
The Google Analytics UA for tracking traffic. Please ask a sysadmin to
Expand Down
6 changes: 3 additions & 3 deletions doc/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Using the web service
This section covers the use of the web service by an end user. Here the
'ModFoo' example web service is used, which is defined by the
:ref:`configuration file <configfile>` to be deployed at
`http://salilab.org/modfoo`.
`http://modbase.compbio.ucsf.edu/modfoo`.

Web interface
=============

End users can simply use the web service by pointing their web browsers to
`http://salilab.org/modfoo/`. This will display the index page,
`http://modbase.compbio.ucsf.edu/modfoo/`. This will display the index page,
from where they can submit jobs or navigate to other pages.

User authentication
Expand All @@ -37,7 +37,7 @@ obtain the generated results. This is achieved with a
`REST <http://en.wikipedia.org/wiki/REST>`_-style interface that talks a simple
form of XML. This interface is provided by a 'job' script; for the fictional
ModFoo web service this would be found at
`http://salilab.org/modfoo/job`. Jobs can be submitted by
`http://modbase.compbio.ucsf.edu/modfoo/job`. Jobs can be submitted by
sending an HTTP POST request to this URL containing the same form data that
would be sent to the regular submit page. On successful submission, the
returned XML file will contain a URL pointing to the job results.
Expand Down
8 changes: 4 additions & 4 deletions perl/saliweb/frontend.pm
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,11 @@ sub get_start_html_parameters {
{-language => 'JavaScript',
-code => $JS_Google_Analytics}]);
my $canon = $self->{canonical_url};
if (defined $canon) {
# if (defined $canon) {
# Prefer https for canonical URLs
$canon =~ s/^http:/https:/;
$param{-head} = $q->Link({-rel=>'canonical', -href=>$canon});
}
# $canon =~ s/^http:/https:/;
# $param{-head} = $q->Link({-rel=>'canonical', -href=>$canon});
# }
return %param;
}

Expand Down
5 changes: 0 additions & 5 deletions test/frontend/frontend.pl
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,6 @@ sub test_display_page {
"<title>$title<\/title>.*<body.*Link 1.*Project menu for.*" .
"test_${page_type}_page.*<\/html>/s",
"$sub generates valid complete HTML page");
if ($page_type eq "index") {
like($out, "/<head>.*<link rel=\"canonical\" " .
"href=\"https://foo/bar/\" />.*</head>/s",
"$sub adds canonical link");
}

$self = make_test_frontend("access${page_type}");
$out = stdout_from { $self->$sub() };
Expand Down

0 comments on commit ce92598

Please sign in to comment.