 
 ;; The form a Set-Cookie should take prior to serialization
 (s/defschema SetCookie
-  {:value                              (s/pred #(re-matches syn/cookie-value %))
-   (s/optional-key :expires)           (s/cond-pre s/Inst (s/pred #(instance? java.time.Duration %)) Rfc822String)
-   (s/optional-key :max-age)           (s/cond-pre s/Str s/Int)
-   (s/optional-key :domain)            (s/pred #(re-matches syn/subdomain %) "domain")
-   (s/optional-key :path)              (s/pred #(re-matches syn/path %))
-   (s/optional-key :secure)            s/Bool
-   (s/optional-key :http-only)         s/Bool
+  {:value (s/pred #(re-matches syn/cookie-value %))
+   (s/optional-key :expires) (s/cond-pre s/Inst (s/pred #(instance? java.time.Duration %)) Rfc822String)
+   (s/optional-key :max-age) (s/cond-pre s/Str s/Int)
+   (s/optional-key :domain) (s/pred #(re-matches syn/subdomain %) "domain")
+   (s/optional-key :path) (s/pred #(re-matches syn/path %))
+   (s/optional-key :secure) s/Bool
+   (s/optional-key :http-only) s/Bool
    ;; technically this could also support a boolean which would default
    ;; to :strict, but let's be explicit about it
-   (s/optional-key :same-site)         (s/enum :strict :lax)
+   (s/optional-key :same-site) (s/enum :strict :lax)
    (s/constrained s/Keyword namespace) s/Any})
 
 (s/defschema Cookies

  (sc/coercer Cookies CookieMappings))

(def set-cookie-attrs
  {:domain    "Domain", :max-age "Max-Age", :path      "Path"
   :secure    "Secure", :expires "Expires", :http-only "HttpOnly"
   :same-site "SameSite"})

(defn encode-attributes [cv]

                  :secure (assoc acc :secure v)
                  :http-only (assoc acc :http-only v)
                  :name acc
                  (if (namespace k) (assoc acc k v) acc)))
              {}
              cookie-def)
             (if (instance? Cookie val)
