Minor update

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

View file

@ -11,6 +11,19 @@ Here is a CORS proxy implemented in very few lines of clojure.
lein run
```
Then in your js code
```js
// BEFORE
document.fetch(url) // => FAIL WITH CORS
// AFTER
document.fetch('http://127.0.0.1:1977/?url=' + encodeURIComponent(url)) // => WORKS
```
As simple as that.
## License
Copyright © 2024 Yann Esposito

View file

@ -13,7 +13,7 @@
:url url})))
(defn -main
[& args]
[& _args]
(jetty/run-jetty
(-> handler
(wrap-params)