diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index ee54b81d1..89804cffb 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -65,6 +65,8 @@ class DashboardController < ApplicationController # If you don't do this, you will hit hard to debug # CSP errors on local when changing API_HOST. response.headers["Cache-Control"] = "no-cache, no-store" + response.headers["Pragma"] = "no-cache" + response.headers["Expires"] = "0" load_css_assets load_js_assets render actn diff --git a/db/seeds.rb b/db/seeds.rb index e18bca824..31bbe0e02 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -7,7 +7,7 @@ if Rails.env == "development" ENV['OS_UPDATE_SERVER'] = "http://non_legacy_update_url.com" # CREDIT: Faker Ruby Gem VEGGIES = %w(artichoke arugula asparagus broccoli - cabbage carrot cauliflower celery chive cornichon cucumber + cabbage carrot cauliflower celery chive cucumber eggplant endive garlic jicama kale kohlrabi leek lettuce okra onion parsnip pepper potato pumpkin radicchio radish raspberry rhubarb spinach squash tomato turnip zucchini) diff --git a/frontend/config/__tests__/actions_test.ts b/frontend/config/__tests__/actions_test.ts index d93753918..1deaec450 100644 --- a/frontend/config/__tests__/actions_test.ts +++ b/frontend/config/__tests__/actions_test.ts @@ -59,7 +59,7 @@ describe("Actions", () => { storeToken(old, dispatch)(undefined); expect(setToken).toHaveBeenCalledWith(old); expect(didLogin).toHaveBeenCalledWith(old, dispatch); - expect(console.warn).toHaveBeenCalledWith(expect.stringContaining( - "Failed to refresh token")); + expect(console.warn) + .toHaveBeenCalledWith(expect.stringContaining("Can't refresh token.")); }); }); diff --git a/frontend/config/actions.ts b/frontend/config/actions.ts index 47efccffb..92588ea47 100644 --- a/frontend/config/actions.ts +++ b/frontend/config/actions.ts @@ -8,7 +8,7 @@ import { timeout } from "promise-timeout"; export const storeToken = (old: AuthState, dispatch: Function) => (_new: AuthState | undefined) => { const t = _new || old; - (!_new) && console.warn("Failed to refresh token. Something is wrong."); + (!_new) && console.warn("Can't refresh token. Is API_HOST set correctly?"); dispatch(setToken(t)); didLogin(t, dispatch); }; diff --git a/frontend/devices/reducer.ts b/frontend/devices/reducer.ts index e10a845fa..34b4c11be 100644 --- a/frontend/devices/reducer.ts +++ b/frontend/devices/reducer.ts @@ -8,7 +8,7 @@ import { maybeNegateStatus } from "../connectivity/maybe_negate_status"; import { EdgeStatus } from "../connectivity/interfaces"; import { ReduxAction } from "../redux/interfaces"; import { connectivityReducer } from "../connectivity/reducer"; -import { versionOK, fancyDebug } from "../util"; +import { versionOK } from "../util"; import { EXPECTED_MAJOR, EXPECTED_MINOR } from "./actions"; import { DeepPartial } from "redux"; import { incomingLegacyStatus } from "../connectivity/connect_device"; @@ -129,7 +129,6 @@ export let botReducer = generateReducer(initialState(), afterEach) return s; }) .add>(Actions.STATUS_UPDATE, (s, { payload }) => { - fancyDebug({ payload }); s.hardware = { ...s.hardware, ...(payload as typeof s.hardware)