mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Fix content security policy for the CDN
The CDN URLs aren’t in included in the content security policy. So browsers will refuse to load them. This commit: - adds each of the CDN URLs to the - only prepend URLs in CSS files with `/static/` if we’re running locally (because the CDN URLs are like `static.example.com` not `example.com/static`)
This commit is contained in:
@@ -37,7 +37,7 @@ gulp.task('copy:govuk_template:css', () => gulp.src(paths.template + 'assets/sty
|
||||
}))
|
||||
.on('error', plugins.sass.logError)
|
||||
.pipe(plugins.cssUrlAdjuster({
|
||||
prependRelative: '/static/',
|
||||
prependRelative: process.env.NOTIFY_ADMIN_ENVIRONMENT == 'config.Development' ? '/static/' : '/',
|
||||
}))
|
||||
.pipe(gulp.dest(paths.dist + 'stylesheets/'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user