Skip to content

Commit 7ba6ddb

Browse files
authored
Add embeds options, upgrade to safer Ruby (#114)
* Add embeds initializer * Bump Ruby version * Bump Ruby version
1 parent 7b7f2d5 commit 7ba6ddb

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.1
1+
3.1.4

Dockerfile.production

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ RUN rm /etc/nginx/sites-enabled/default
3030
RUN mkdir -p $HOME
3131
WORKDIR $HOME
3232

33-
RUN bash -lc 'rvm install ruby-3.1.1'
34-
RUN bash -lc 'rvm --default use ruby-3.1.1'
33+
RUN bash -lc 'rvm install ruby-3.1.4'
34+
RUN bash -lc 'rvm --default use ruby-3.1.4'
3535

3636
RUN gem install bundler -v 2.4.10
3737

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DECIDIM_VERSION = { git: 'https://github.com/decidim/decidim', tag: 'v0.28.0' }.
44

55
source "https://rubygems.org"
66

7-
ruby '3.1.1'
7+
ruby '3.1.4'
88

99

1010
gem "decidim", DECIDIM_VERSION

Gemfile.lock

+2-1
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ GEM
820820

821821
PLATFORMS
822822
arm64-darwin-21
823+
arm64-darwin-23
823824
x86_64-linux
824825

825826
DEPENDENCIES
@@ -844,7 +845,7 @@ DEPENDENCIES
844845
web-console
845846

846847
RUBY VERSION
847-
ruby 3.1.1p18
848+
ruby 3.1.4p223
848849

849850
BUNDLED WITH
850851
2.4.10

config/initializers/decidim.rb

+11
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@
3636

3737
# Defines the social networking services used for social sharing
3838
config.social_share_services = %w(X Facebook WhatsApp Telegram)
39+
40+
config.content_security_policies_extra = {
41+
"default-src" => %w('self' 'unsafe-inline'),
42+
"script-src" => %w('self' 'unsafe-inline' 'unsafe-eval'),
43+
"style-src" => %w('self' 'unsafe-inline'),
44+
"img-src" => %w('self' *.hereapi.com data: *.amazonaws.com),
45+
"font-src" => %w('self'),
46+
"connect-src" => %w('self' *.hereapi.com *.jsdelivr.net *.amazonaws.com),
47+
"frame-src" => %w('self' *.youtube.com www.youtube-nocookie.com player.vimeo.com *.google.com *.airtable.com *.flourish.studio),
48+
"media-src" => %w('self')
49+
}
3950
end
4051

4152
# Inform Decidim about the assets folder

0 commit comments

Comments
 (0)