Fork me on GitHub
#pedestal
<
2022-03-18
>
sb09:03:04

Is that possible to setup different headersize for localhost (cljs->clj requests) or API URL? (I know maybe better to do Google way, redirect POST to GET, but I would like to understand is that possible?

souenzzo12:03:22

You can have different main's with different configs for dev setup and prod setup based on this example: https://github.com/pedestal/pedestal/issues/615#issuecomment-505622534 you can do:

(def service
  {...})
(defn dev-main
  [& args]
  (-> service
    (assoc-in [::http/container-options :io.pedestal.http.jetty/http-configuration]
      (http-configuration 5000))
    http/default-interceptors
    http/create-server
    http/start))
(defn -main
  [& args]
  (-> service
    http/default-interceptors
    http/create-server
    http/start))

👍 1