(def wrapped-handler
;; Handler middlewares
(-> all-routes
(wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false))
wrap-params
wrap-session
))
java.lang.NullPointerException
at ring.adapter.jetty$proxy_handler$fn__6990.invoke(jetty.clj:26)
at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:503)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.base/java.lang.Thread.run(Thread.java:834)
(def wrapped-handler
;; Handler middlewares
(-> all-routes
(wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false))
wrap-params
wrap-session
wrap-reload
))
server {
server_name domain.com;
location / {
proxy_pass http://localhost:9000/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
}
--
You received this message because you are subscribed to the Google Groups "Compojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to compojure+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/compojure/ab2041d1-c31a-4d31-91e1-0a70a6d70cbc%40googlegroups.com.
Before we continue, I would like to thank you very much for your explanation.
I have continued the steps, now I am using the latest version of Ring, I have cleaned with lein clean , I have eliminated the extra headers... but the problem persists... I'm quite confused about it, I feel stuck.
java.lang.NullPointerException
at ring.adapter.jetty$proxy_handler$fn__6280.invoke(jetty.clj:27)
at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:500)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.base/java.lang.Thread.run(Thread.java:834)
(ns glosa.core
(:require
[glosa.config :refer [config]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.reload :refer [wrap-reload]]
[ring.middleware.cors :refer [wrap-cors]]
[glosa.urls :refer [all-routes]]
[ring.adapter.jetty :refer [run-jetty]]) (:gen-class))
(def wrapped-handler
;; Handler middlewares
(-> all-routes
(wrap-defaults (assoc-in site-defaults [:security :anti-forgery] false))
(wrap-cors
:access-control-allow-origin [(re-pattern (if (config :debug) ".*" (config :domain-cli)))]
:access-control-allow-methods [:get :post])
(#(if (config :debug) (wrap-reload %)))))
(defn -main [& args]
;; Main
;; Run web server
(run-jetty wrapped-handler {:port (config :port)}))
To unsubscribe from this group and stop receiving emails from it, send an email to comp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/compojure/ab2041d1-c31a-4d31-91e1-0a70a6d70cbc%40googlegroups.com.
--James Reeves
(#(if (config :debug) (wrap-reload %)))))
(#(if (config :debug) (wrap-reload %) %))))
(cond-> (config :debug) wrap-reload))))
To unsubscribe from this group and stop receiving emails from it, send an email to compojure+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/compojure/6bfaffeb-1384-456c-81de-fdcccddc35ac%40googlegroups.com.
https://github.com/glosa/glosa-server
A hug :)