lib/copy/server.rb in copy-0.0.4 vs lib/copy/server.rb in copy-0.0.41

- old
+ new

@@ -15,12 +15,12 @@ throw(:halt, [401, "Not authorized\n"]) end end def authorized? - return false unless settings.respond_to?(:admin_username) && settings.respond_to?(:admin_password) + return false unless settings.respond_to?(:copy_username) && settings.respond_to?(:copy_password) @auth ||= Rack::Auth::Basic::Request.new(request.env) - @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.admin_username, settings.admin_password] + @auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.copy_username, settings.copy_password] end def set_cache_control_header if settings.respond_to?(:cache_time) && settings.cache_time.is_a?(Numeric) && settings.cache_time > 0 expires settings.cache_time, :public \ No newline at end of file