I have web server serving requests from two domains: domain1.com and 
domain2.com
The assets directories are different for the two domains.

webrootdomain1/assets
and
webrootdomain2/assets

How to make the handler for assets to serve different directory depending 
from 
the requests from different domains? So they to be dependent from the host?

For example domain1.com/assets/ to be handled from:
http.Handle("/assets/", http.StripPrefix("/", 
http.FileServer(http.Dir(*webrootdomain1))))

and domain2.com/assets/ to be handled from:
http.Handle("/assets/", http.StripPrefix("/", 
http.FileServer(http.Dir(*webrootdomain2))))


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to