Support a homepage :)

This commit is contained in:
Yann Esposito (Yogsototh) 2024-03-07 17:25:42 +01:00
parent 5ec587e25e
commit 2a6dcde058
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 6 additions and 2 deletions

View file

@ -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})

View file

@ -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]