0

I'd like to deny access if the REMOTE_USER does not match SUBDOMAIN.example.com. The site is protected by Require valid-user (as usual). Currently anybody can access all areas so long as she's logged in.

The intended behavior is this:

  • alice can access alice.example.com and nothing else
  • bob can access bob.example.com and nothing else
  • bonus points for granting all-access to admin

Sound too easy? Here's the catch: Subdomains/usernames are dynamic, so any hard-coded "alice" or "bob" strings do not count!

Is there any way I can do that with Apache?

Thanks!

1 Answer 1

0

As the apps I'm trying to authorize are all Rack apps, I've ended up implementing this as a Rack middleware, released as the Portarius gem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .