Support a homepage :)
This commit is contained in:
parent
5ec587e25e
commit
2a6dcde058
|
@ -9,4 +9,5 @@
|
|||
[ring/ring-core "1.11.0"]
|
||||
[ring/ring-jetty-adapter "1.11.0"] ]
|
||||
:main "fuck-cors-app.core"
|
||||
:aot :all
|
||||
:repl-options {:init-ns fuck-cors-app.core})
|
||||
|
|
|
@ -8,9 +8,12 @@
|
|||
|
||||
(defn handler
|
||||
[request]
|
||||
(let [url (get-in request [:query-params "url"])]
|
||||
(if-let [url (get-in request [:query-params "url"])]
|
||||
(client/request {:request-method (:request-method request)
|
||||
:url url})))
|
||||
:url url})
|
||||
{:status 200
|
||||
:headers {"Content-Type" "text/plain; charset=utf-8"}
|
||||
:body "Let's bypass CORS ok?"}))
|
||||
|
||||
(defn -main
|
||||
[& _args]
|
||||
|
|
Loading…
Reference in a new issue