Skip to content

Commit

Permalink
Add embeds options, upgrade to safer Ruby (#114)
Browse files Browse the repository at this point in the history
* Add embeds initializer

* Bump Ruby version

* Bump Ruby version
  • Loading branch information
ferblape authored Sep 16, 2024
1 parent 7b7f2d5 commit 7ba6ddb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.1.4
4 changes: 2 additions & 2 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ RUN rm /etc/nginx/sites-enabled/default
RUN mkdir -p $HOME
WORKDIR $HOME

RUN bash -lc 'rvm install ruby-3.1.1'
RUN bash -lc 'rvm --default use ruby-3.1.1'
RUN bash -lc 'rvm install ruby-3.1.4'
RUN bash -lc 'rvm --default use ruby-3.1.4'

RUN gem install bundler -v 2.4.10

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DECIDIM_VERSION = { git: 'https://github.com/decidim/decidim', tag: 'v0.28.0' }.

source "https://rubygems.org"

ruby '3.1.1'
ruby '3.1.4'


gem "decidim", DECIDIM_VERSION
Expand Down
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ GEM

PLATFORMS
arm64-darwin-21
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -844,7 +845,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 3.1.1p18
ruby 3.1.4p223

BUNDLED WITH
2.4.10
11 changes: 11 additions & 0 deletions config/initializers/decidim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@

# Defines the social networking services used for social sharing
config.social_share_services = %w(X Facebook WhatsApp Telegram)

config.content_security_policies_extra = {
"default-src" => %w('self' 'unsafe-inline'),
"script-src" => %w('self' 'unsafe-inline' 'unsafe-eval'),
"style-src" => %w('self' 'unsafe-inline'),
"img-src" => %w('self' *.hereapi.com data: *.amazonaws.com),
"font-src" => %w('self'),
"connect-src" => %w('self' *.hereapi.com *.jsdelivr.net *.amazonaws.com),
"frame-src" => %w('self' *.youtube.com www.youtube-nocookie.com player.vimeo.com *.google.com *.airtable.com *.flourish.studio),
"media-src" => %w('self')
}
end

# Inform Decidim about the assets folder
Expand Down

0 comments on commit 7ba6ddb

Please sign in to comment.