Skip to content

Commit

Permalink
mention skip_ssrf_protection in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohta Kimura authored and rajyan committed Sep 11, 2023
1 parent fb74a1d commit dd01745
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ruby:3.2

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
build-essential \
libvips

WORKDIR /app
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,14 +659,15 @@ end
## Testing with CarrierWave

It's a good idea to test your uploaders in isolation. In order to speed up your
tests, it's recommended to switch off processing in your tests, and to use the
tests, it's recommended to switch off processing in your tests, disable SSRF protection, and to use the
file storage. In Rails you could do that by adding an initializer with:

```ruby
if Rails.env.test? or Rails.env.cucumber?
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
config.skip_ssrf_protection = true
end
end
```
Expand Down
9 changes: 9 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
ruby:
build: .
volumes:
- .:/app
- bundle:/usr/local/bundle

volumes:
bundle:

0 comments on commit dd01745

Please sign in to comment.