Skip to content

Commit

Permalink
Merge branch 'trs/bypass-cloudfront'
Browse files Browse the repository at this point in the history
  • Loading branch information
tsibley committed Jun 22, 2022
2 parents 3898a59 + 4365b26 commit c4db81c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/sources/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const authorization = process.env.GITHUB_TOKEN

class CoreSource extends Source {
get name() { return "core"; }
async baseUrl() { return "http://data.nextstrain.org/"; }
async baseUrl() { return "https://nextstrain-data.s3.amazonaws.com/"; }
get repo() { return "nextstrain/narratives"; }
get branch() { return "master"; }

Expand Down Expand Up @@ -87,7 +87,7 @@ class CoreSource extends Source {

class CoreStagingSource extends CoreSource {
get name() { return "staging"; }
async baseUrl() { return "http://staging.nextstrain.org/"; }
async baseUrl() { return "https://nextstrain-staging.s3.amazonaws.com/"; }
get repo() { return "nextstrain/narratives"; }
get branch() { return "staging"; }
}
Expand Down
16 changes: 7 additions & 9 deletions src/sources/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const {NoResourcePathError} = require("../exceptions");
*
* A concrete example:
*
* CoreSource (in ./core.js) represents a Cloudfront distribution
* (https://data.nextstrain.org) in front of an S3 bucket
* (s3://nextstrain-data).
* CoreSource (in ./core.js) represents an S3 bucket (s3://nextstrain-data).
*
* const coreSource = new CoreSource()
*
Expand All @@ -44,16 +42,16 @@ const {NoResourcePathError} = require("../exceptions");
* These Subresources can be retrieved at the following URLs, which you obtain
* using the Subresource.url() method:
*
* https://data.nextstrain.org/flu_seasonal_h3n2_ha_2y.json
* https://data.nextstrain.org/flu_seasonal_h3n2_ha_2y_tip-frequencies.json
* https://nextstrain-data.s3.amazonaws.com/flu_seasonal_h3n2_ha_2y.json
* https://nextstrain-data.s3.amazonaws.com/flu_seasonal_h3n2_ha_2y_tip-frequencies.json
*
* Typically, the URL for a specific Subresource is composed from details in
* the Source, Resource, and Subresource instances. For example:
*
* https://data.nextstrain.org/flu_seasonal_h3n2_ha_2y_tip-frequencies.json
* \_________________________/ \_____________________/ \__________________/
* from Source from Dataset from
* DatasetSubresource
* https://nextstrain-data.s3.amazonaws.com/flu_seasonal_h3n2_ha_2y_tip-frequencies.json
* \______________________________________/ \_____________________/ \__________________/
* from Source from Dataset from
* DatasetSubresource
*
* The actual URL construction varies between implementations but is broadly
* similar.
Expand Down

0 comments on commit c4db81c

Please sign in to comment.