sijie closed pull request #2268: Use HTTPs for downloads in new website
URL: https://github.com/apache/incubator-pulsar/pull/2268
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/site2/website/pages/en/download.js
b/site2/website/pages/en/download.js
index 6d34397cb2..aff409a450 100644
--- a/site2/website/pages/en/download.js
+++ b/site2/website/pages/en/download.js
@@ -12,6 +12,9 @@ const releases = require(`${CWD}/releases.json`);
const archiveRootUrl = siteConfig.archiveRootUrl;
+function getLatestArchiveMirrorUrl(version, type) {
+ return
`https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=incubator/pulsar/pulsar-${version}/apache-pulsar-${version}-${type}.tar.gz`
+}
function archiveUrl(version, type) {
return
`${archiveRootUrl}/pulsar-${version}/apache-pulsar-${version}-${type}.tar.gz`
@@ -22,6 +25,8 @@ class Download extends React.Component {
const latestRelease = releases[0];
const latestVersion = `${latestRelease}-incubating`
+ const latestArchiveMirrorUrl = getLatestArchiveMirrorUrl(latestVersion,
'bin');
+ const latestSrcArchiveMirrorUrl = getLatestArchiveMirrorUrl(latestVersion,
'src');
const latestArchiveUrl = archiveUrl(latestVersion, 'bin');
const latestSrcArchiveUrl = archiveUrl(latestVersion, 'src')
@@ -55,22 +60,22 @@ class Download extends React.Component {
<tr key={'binary'}>
<th>Binary</th>
<td>
- <a
href={latestArchiveUrl}>pulsar-{latestVersion}-bin.tar.gz</a>
+ <a
href={latestArchiveMirrorUrl}>pulsar-{latestVersion}-bin.tar.gz</a>
</td>
<td>
- <a href={`${latestArchiveUrl}.asc`}>asc</a>,
- <a href={`${latestArchiveUrl}.sha1`}>sha1</a>,
+ <a href={`${latestArchiveUrl}.asc`}>asc</a>,
+ <a href={`${latestArchiveUrl}.sha1`}>sha1</a>,
<a href={`${latestArchiveUrl}.sha512`}>sha512</a>
</td>
</tr>
<tr key={'source'}>
<th>Source</th>
<td>
- <a
href={latestSrcArchiveUrl}>pulsar-{latestVersion}-src.tar.gz</a>
+ <a
href={latestSrcArchiveMirrorUrl}>pulsar-{latestVersion}-src.tar.gz</a>
</td>
<td>
- <a href={`${latestSrcArchiveUrl}.asc`}>asc</a>,
- <a href={`${latestSrcArchiveUrl}.sha1`}>sha1</a>,
+ <a href={`${latestSrcArchiveUrl}.asc`}>asc</a>,
+ <a href={`${latestSrcArchiveUrl}.sha1`}>sha1</a>,
<a href={`${latestSrcArchiveUrl}.sha512`}>sha512</a>
</td>
</tr>
@@ -98,13 +103,13 @@ class Download extends React.Component {
<h2>Getting started</h2>
<div>
<p>
- Once you've downloaded a Pulsar release, instructions on
getting up and running with a standalone cluster
+ Once you've downloaded a Pulsar release, instructions on
getting up and running with a standalone cluster
that you can run on your laptop can be found in the{' '}
<a href={`${siteConfig.baseUrl}docs/standalone`}>Run Pulsar
locally</a> tutorial.
</p>
</div>
<p>
- If you need to connect to an existing Pulsar cluster or instance
using an officially supported client,
+ If you need to connect to an existing Pulsar cluster or instance
using an officially supported client,
see the client docs for these languages:
</p>
<table className="clients">
diff --git a/site2/website/siteConfig.js b/site2/website/siteConfig.js
index 9a9165ec59..d5f67798ed 100644
--- a/site2/website/siteConfig.js
+++ b/site2/website/siteConfig.js
@@ -17,7 +17,7 @@ const createVariableInjectionPlugin = variables => {
// javadoc:<name>:<url_path>
if (keyparts[0] == 'javadoc') {
return renderUrl(initializedPlugin, javadocUrl, keyparts);
- // githubUrl:<name>:<path>
+ // githubUrl:<name>:<path>
} else if (keyparts[0] == 'github') {
return renderUrl(initializedPlugin, githubUrl + "/tree/master/",
keyparts);
}
@@ -105,7 +105,7 @@ const siteConfig = {
copyright:
'Copyright © ' +
new Date().getFullYear() +
- ' The Apache Software Foundation. All Rights Reserved.' +
+ ' The Apache Software Foundation. All Rights Reserved.' +
' Apache, Apache Pulsar and the Apache feather logo are trademarks of The
Apache Software Foundation.',
highlight: {
@@ -139,10 +139,10 @@ const siteConfig = {
},
githubUrl: githubUrl,
- archiveRootUrl: 'http://archive.apache.org/dist/incubator/pulsar',
+ archiveRootUrl: 'https://archive.apache.org/dist/incubator/pulsar',
projectDescription: `
- Apache Pulsar is an open-source distributed pub-sub messaging system
originally
+ Apache Pulsar is an open-source distributed pub-sub messaging system
originally
created at Yahoo and now part of the Apache Software Foundation
`,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services