Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/component/AppBarHsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const AppBarHsl = ({ lang, user, favourites }, context) => {
{!config.hideHeader && (
<SiteHeader
baseUrl={config.URL.ROOTLINK}
staticAssetsUrl="/static-assets"
staticAssetsUrl={config.URL.STATIC_ASSETS}
lang={lang}
userMenu={userMenu}
langMenu={languages}
Expand Down
3 changes: 2 additions & 1 deletion app/configurations/config.hsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const SUGGESTION_URL = process.env.CONTENT_DOMAIN
? `${process.env.CONTENT_DOMAIN}/api/v1/search/suggestions`
: 'https://content.hsl.fi/api/v1/search/suggestions'; // old url
const travelersAccountUrl = process.env.TRAVELERS_ACCOUNT_URL;
const staticAssetsUrl = process.env.STATIC_ASSETS_URL;
const staticAssetsUrl =
process.env.STATIC_ASSETS_URL || 'https://staticfiles-test.hslfi.hsldev.com/';

const virtualMonitorBaseUrl = IS_DEV
? 'https://dev-hslmonitori.digitransit.fi'
Expand Down
11 changes: 0 additions & 11 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,6 @@ function setUpMiddleware() {
// proxy for dev-bundle
app.use('/proxy/', proxy(`http://localhost:${hotloadPort}/`));
}
// Proxy static assets to avoid CORS issues when fetching from the browser
// TODO this is a hacky solution, contact site-header admins to update site-header cors settings.
const staticAssetsBaseUrl = process.env.STATIC_ASSETS_URL;
if (staticAssetsBaseUrl) {
app.use(
'/static-assets',
proxy(staticAssetsBaseUrl, {
proxyReqPathResolver: req => req.url,
}),
);
}
}

function onError(err, req, res) {
Expand Down
Loading