Compojure + htmx get yields 403 forbidden

55 Views Asked by At

I have build a small hello world app with composure and htmx:

    (defroutes app-routes
  (GET "/" [] "
<html>
<script src=\"https://unpkg.com/[email protected]\"></script>
  <!-- have a button POST a click via AJAX -->
  <button hx-post=\"/clicked\" hx-swap=\"outerHTML\">
    Click Me
  </button>
</html>
")

  (POST "/clicked" [] "
<html>
<body>
Hell
<\body>
</html>
")

But when I click on the button, I get [email protected]:1 Response Status Error Code 403 from /clicked

Why is that?

0

There are 0 best solutions below