Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Camo

Ruby client for Camo - the SSL image proxy 🔒

Get Started

Note: If you have not set up the Camo server, start with Deploying the Server.

Add this line to your application’s Gemfile:

gem "camo"

Add your Camo host and key to your environment or create an initializer config/initializers/camo.rb.

ENV["CAMO_HOST"] = "https://camo.herokuapp.com"
ENV["CAMO_KEY"] = "rzsJbU5YxDfdP3FXHjshtgEN"

You can now use the camo method in your views and controllers.

<%= image_tag camo("https://placekitten.com/g/200/300") %>

It’s that easy!

Deploying the Server

Clone the camo repository.

git clone https://github.com/atmos/camo.git
cd camo

Create a new project on Heroku.

heroku create myapp-camo
git push heroku master

Choose a random secret key and add it to your app.

heroku config:set CAMO_KEY=rzsJbU5YxDfdP3FXHjshtgEN

Open your app to make sure it’s working. You should see the text “hwhat”.

heroku open

Credit

Thanks to Corey Donohoe for creating Camo and providing most of the Ruby code for this gem.

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/camo.git
cd camo
bundle install
bundle exec rake test

About

Ruby client for Camo - the SSL image proxy

Resources

License

Packages

No packages published

Languages