       (wrap-params)
       (wrap-multipart-params {:store (byte-array-store)})
       (wrap-stacktrace-web)
-      (wrap-access-control)
+      (wrap-access-control allow-hosts)
       (wrap-reload)
       (add-version-header)))
 

  (let [{:keys [options arguments summary errors]} (validate-certkey (parse-opts args argspec))
        docroot (:root options)
        port (:port options)
        host (:host options)
        tmp (:tmp options)
        logfile (:logfile options)


(def ^:private argspec
  [[nil "--no-serve" "Don't start web server" :id :serve :parse-fn not :default true]
   ["-a" "--allow PATTERN" "Allow CORS from hosts matching pattern" :default [] :assoc-fn (fn [m k v] (update-in m [k] conj v))
    :validate [re-pattern "Invalid pattern"]]
   ["-p" "--port PORT" "Server port to listen on" :default 7222 :parse-fn #(Integer/parseInt %)]
   ["-l" "--load" "Load files into running server"]
   ["-x" "--delete" "Delete file from running server"]
