Skip to content

Commit

Permalink
Replace network_site variable for heroku_app
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopezvsr committed Aug 22, 2024
1 parent a9f1f87 commit cd14b3d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
DJANGO_SECRET_KEY: secret
DOMAIN_REDIRECT_MIDDLEWARE_ENABLED: False
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NETWORK_SITE_URL: http://localhost:8000
HEROKU_APP_NAME: http://localhost:8000
PIPENV_VERBOSITY: -1
PULSE_API_DOMAIN: https://network-pulse-api-production.herokuapp.com
PULSE_DOMAIN: https://www.mozillapulse.org
Expand Down
5 changes: 0 additions & 5 deletions network-api/networkapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
HEROKU_RELEASE_VERSION=(str, None),
INDEX_PAGE_CACHE_TIMEOUT=(int, 60 * 60 * 24),
MOZFEST_DOMAIN_REDIRECT_ENABLED=(bool, False),
NETWORK_SITE_URL=(str, ""),
PETITION_TEST_CAMPAIGN_ID=(str, ""),
PNI_STATS_DB_URL=(str, None),
PULSE_API_DOMAIN=(str, ""),
Expand Down Expand Up @@ -695,7 +694,6 @@ class DatabasesDict(TypedDict):
FRONTEND = {
"PULSE_API_DOMAIN": env("PULSE_API_DOMAIN"),
"PULSE_DOMAIN": env("PULSE_DOMAIN"),
"NETWORK_SITE_URL": env("NETWORK_SITE_URL"),
"TARGET_DOMAINS": env("TARGET_DOMAINS"),
"SENTRY_DSN": env("SENTRY_DSN"),
"RELEASE_VERSION": env("HEROKU_RELEASE_VERSION"),
Expand All @@ -718,9 +716,6 @@ class DatabasesDict(TypedDict):
# privacynotincluded statistics DB
PNI_STATS_DB_URL = env("PNI_STATS_DB_URL")

# Use network_url to check if we're running prod or not
NETWORK_SITE_URL = env("NETWORK_SITE_URL")

# Blog/Campaign index cache setting
INDEX_PAGE_CACHE_TIMEOUT = env("INDEX_PAGE_CACHE_TIMEOUT")

Expand Down
6 changes: 1 addition & 5 deletions source/js/buyers-guide/bg-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let main = {

this.fetchEnv((envData) => {
env = envData;
networkSiteURL = env.NETWORK_SITE_URL;
networkSiteURL = `https://${env.HEROKU_APP_NAME}.herokuapp.com`;
if (env.SENTRY_DSN) {
// Initialize Sentry error reporting
initializeSentry(
Expand All @@ -63,10 +63,6 @@ let main = {
sessionStorage.setItem("subscribed", subscribed);
}

// HEROKU_APP_DOMAIN is used by review apps
if (!networkSiteURL && env.HEROKU_APP_NAME) {
networkSiteURL = `https://${env.HEROKU_APP_NAME}.herokuapp.com`;
}

Check failure on line 66 in source/js/buyers-guide/bg-main.js

View workflow job for this annotation

GitHub Actions / Node CI

Delete `⏎`
this.injectReactComponents();
this.bindHandlers();
Expand Down
7 changes: 1 addition & 6 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ let main = {

this.fetchEnv((envData) => {
env = envData;
networkSiteURL = env.NETWORK_SITE_URL;
networkSiteURL = `https://${env.HEROKU_APP_NAME}.herokuapp.com`;

if (env.SENTRY_DSN) {
// Initialize Sentry error reporting
Expand All @@ -77,11 +77,6 @@ let main = {
);
}

// HEROKU_APP_DOMAIN is used by review apps
if (!networkSiteURL && env.HEROKU_APP_NAME) {
networkSiteURL = `https://${env.HEROKU_APP_NAME}.herokuapp.com`;
}

this.injectReactComponents();
this.bindHandlers();
initializePrimaryNav(networkSiteURL, primaryNav);
Expand Down

0 comments on commit cd14b3d

Please sign in to comment.