Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post-redirect? not working or Preflight response is not successful #318

Open
zendevil opened this issue Mar 4, 2020 · 0 comments
Open

Comments

@zendevil
Copy link

zendevil commented Mar 4, 2020

I have the following code:

defresource handle-sign-in [redirect-uri]
  :available-media-types ["application/json"]
  :allowed-methods [:post]
  :post! (prn "welcome to post")
  :post-redirect? (fn [_] ;;(ring-response
                           {:location redirect-uri}
                           ;;)
                    )
  )

When I send the request, I get the errors Preflight response is not successful and XMLHttpRequest cannot load [authorize-uri] due to access control checks.
When I wrap the redirect location map around ring-response, however, I don't get the errors but neither do I get the redirect. What am I doing wrong?

@zendevil zendevil changed the title post-redirect? not working. post-redirect? not working or Preflight response is not successful Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant