Code Monkey home page Code Monkey logo

gyazo_server's People

Contributors

natsumesou avatar

Stargazers

 avatar

Watchers

 avatar

gyazo_server's Issues

The way of setting 'session secret' is too bad.

To store a secret key, you should use something like pit. I made a patch to fix this.

diff --git Gemfile Gemfile
index e47bdeb..83fd9e4 100644
--- Gemfile
+++ Gemfile
@@ -13,6 +13,7 @@ gem 'rake'
gem 'sinatra-flash', :require => 'sinatra/flash'
#gem 'shared-mime-info'
gem 'ruby-filemagic', '~> 0.4.2'
+gem 'pit'

Component requirements

diff --git config/apps.rb config/apps.rb
index 7b23d7c..5572840 100644
--- config/apps.rb
+++ config/apps.rb
@@ -25,9 +25,13 @@

Setup global project settings for your apps. These settings are inherited by every subapp. You can

override these settings in the subapps as needed.

+require 'pit'
Padrino.configure_apps do

enable :sessions

  • set :session_secret, '7afcbd713f88aa30b33a6c26d328e4f857aba114fd1fe1814b627aa246c33c78'
  • config = Pit.get("gyazo_server", require => {
  •  "session_secret" => "Enter session secret key",
    
  • })
  • set :session_secret, config["session_secret"]
    end

Mounts the core application for this project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.