[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Webrick and Basic Auth

Jim Freeze

1/7/2005 9:46:00 PM

Hi

I have a directory of files that I want to share over the net
with Webrick. Basically, I have something simple now where
Webrick mounts the directory and serves up the files. Neat
and simple.

However, I have another set of files that I want to share,
but I want to have only authorized people access them.

Is there a simple way (say by adding htaccess to a directory(s))
to add authentication to a webrick mounted directory?

Sorry if this is a dumb question.

Thanks
--
Jim Freeze
Code Red. Code Ruby


3 Answers

Sarah Tanembaum

1/8/2005 9:39:00 AM

0

jim@freeze.org wrote:
> Hi
>
> I have a directory of files that I want to share over the net
> with Webrick. Basically, I have something simple now where
> Webrick mounts the directory and serves up the files. Neat
> and simple.
>
> However, I have another set of files that I want to share,
> but I want to have only authorized people access them.
>
> Is there a simple way (say by adding htaccess to a directory(s))
> to add authentication to a webrick mounted directory?
>
> Sorry if this is a dumb question.
>
> Thanks
Is Webrick secure? What's precautions and gotchas should we put our
attention too? Also, how the performance?

Bill Atkins

1/8/2005 8:38:00 PM

0

Well, that won't do the OP any good if he isn't using Rails.

There's a sample of Webrick authentication at
http://thekode.net/misc/http...

Bill

On Sat, 8 Jan 2005 23:36:25 +0900, Peter Retief <peter@tekboer.tk> wrote:
> Sarah Tanembaum wrote:
> > jim@freeze.org wrote:
> >
> >> Hi
> >>
> >> I have a directory of files that I want to share over the net
> >> with Webrick. Basically, I have something simple now where
> >> Webrick mounts the directory and serves up the files. Neat
> >> and simple.
> >>
> >> However, I have another set of files that I want to share,
> >> but I want to have only authorized people access them.
> >>
> >> Is there a simple way (say by adding htaccess to a directory(s))
> >> to add authentication to a webrick mounted directory?
> >>
> >> Sorry if this is a dumb question.
> >>
> >> Thanks
> >
> > Is Webrick secure? What's precautions and gotchas should we put our
> > attention too? Also, how the performance?
>
> Hi
> Use controller (before_filter) with rubyonrails and the login generator
> Peter
>
>


--
$stdout.sync = true
"Just another Ruby hacker.".each_byte do |b|
('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr
end; print "\n"


Peter Retief

1/9/2005 12:34:00 AM

0

Sarah Tanembaum wrote:
> jim@freeze.org wrote:
>
>> Hi
>>
>> I have a directory of files that I want to share over the net
>> with Webrick. Basically, I have something simple now where
>> Webrick mounts the directory and serves up the files. Neat
>> and simple.
>>
>> However, I have another set of files that I want to share,
>> but I want to have only authorized people access them.
>>
>> Is there a simple way (say by adding htaccess to a directory(s))
>> to add authentication to a webrick mounted directory?
>>
>> Sorry if this is a dumb question.
>>
>> Thanks
>
> Is Webrick secure? What's precautions and gotchas should we put our
> attention too? Also, how the performance?

Hi
Use controller (before_filter) with rubyonrails and the login generator
Peter