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

Scaffolded project raises CORS error on localhost #11

Open
KrzysiekJ opened this issue Jul 14, 2014 · 1 comment
Open

Scaffolded project raises CORS error on localhost #11

KrzysiekJ opened this issue Jul 14, 2014 · 1 comment

Comments

@KrzysiekJ
Copy link

Steps to reproduce

lein new hoplon-castra castra-cors-bug
cd castra-cors-bug
boot development
# In other terminal session:
curl http://localhost:8000

What happens

We get

No Origin Header Specified on Cross-Origin Request%

What should happen

We should get the same result which is returned when invoking curl -H 'Origin: http://localhost:8000' http://localhost:8000, i.e.

<!DOCTYPE html>
<html><head><meta charset="utf-8"><script type="text/javascript">window._hoplon_main_css = 'c6f4dce0-0384-11e4-9191-0800200c9a66.css';</script><script type="text/javascript" src="c6f4dce0-0384-11e4-9191-0800200c9a66.js"></script><script type="text/javascript">tailrecursion.hoplon.app_pages._index_DOT_html.hoploninit();</script></head><body></body></html>%
@alandipert
Copy link
Contributor

Thanks for the report. As a workaround, you can modify your scaffold's build.boot such that your :dependencies look like:

  :dependencies '[[tailrecursion/boot.task   "2.2.1"]
                  [tailrecursion/hoplon      "5.10.11" :exclude [tailrecursion/castra]]
                  [tailrecursion/castra "1.2.0"]]

This rolls Castra back to a pre-CORS version.

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

2 participants