                                             :query (:query-string req)}))}
    :body ""})
 
-;; XXX: redirect for things that don't match the pattern and aren't (profile/hostname)
 (defn handle-custom-domains [handler req]
   (let [subdomain (parse-subdomain req)]
     (if-not subdomain

                (profile/hostname))
        (redirect-to-main req)
        (handler req))
      (handler (assoc req
                      :subdomain subdomain
                      :team (team-model/find-by-subdomain (pcd/default-db) subdomain))))))

(defn wrap-custom-domains [handler]
  (fn [req]

            [pc.models.team :as team-model]
            [pc.profile :as profile]))

(def blacklist #{"www" "admin"})

;; starts with a letter, only contains letters, numbers, and hyphens
