Fork me on GitHub
#fulcro
<
2018-12-22
>
pauld00:12:18

Ok, after an hour of bashing my head against this I see that it has something to do with server/wrap-protect-origins.

pauld00:12:05

Now the question is what to I set my legal-origin to in config/prod.edn? Using the server's domain name does not work. Perhaps using the machine name?

tony.kay01:12:08

@pauld origins are just the hostname that the client knows the server as…so server domain name should work

pauld01:12:33

hmmm, not working.

pauld01:12:58

Trying to get it to show me the request for debugging against the regex.

pauld01:12:42

I bet my server is putting in something strange. Ie not the domain name.

pauld01:12:29

I wonder if it has something to do with the fact that my I don't see "origin" in the header of the request.

pauld01:12:37

I see host.

pauld01:12:20

Reading this seems to indicate that same-origin GET requests will not have the origin header set.

pauld01:12:22

I think this may be a bug in he fulcro.server/legal-origin? function. It should probably check the host header if the origin header does not exist. I'm not sure if this is secure though - I'm not a web dev professional.

tony.kay01:12:59

could in fact be a bug

pauld03:12:00

Yeah, also setting :allow-when-origin-missing? to true does not work like I think in should as well.

tony.kay04:12:43

well, just stip out that middleware…I’d appreciate an issue report on the fulcro lein template, with details of what you’re seeing

pauld09:12:07

sure thing

juri11:12:25

Hi. I'm trying to get started with the fulcro tutorial. However, when I run the script I get the error message down below. And I don't really know how to fix my setup. I've tried on both Git Bash and the standard Windows command prompt. The "lein" command works on both, but for some reason it doesn't work inside the script. Any advice? ./run-tutorial.sh: line 5: lein: command not found

pauld12:12:27

I would edit the run-tutorial.sh file to set the location of your lein installation. So instead of lein you would have /home/juri/bin/lein

pauld12:12:37

or wherever lein is installed

pauld12:12:46

which lein will tell you

pauld12:12:01

which lein
at the terminal

pauld12:12:22

where is this tutorial?

pauld12:12:30

That might be an old tutorial, you might be better off using the lein-template and following along with the first chapter of the fulcro manual.

pauld12:12:03

that is the fulcro developer guide http://book.fulcrologic.com

juri13:12:20

@pauld Oh ok, thanks! I will try the developer guide instead. I found the tutorial via the fulcro website https://github.com/fulcrologic/fulcro-tutorial.

pauld13:12:42

Yeah, I'm new to fulcro too - they are moving fast. For instance the template uses workspaces and shadow-cljs instead of devcards and figwheel.

jzhu512119:12:50

the workspace is really annoying to some degree... How can I see a pure UI without query in workspace ?

wilkerlucio13:12:58

hello, if you don't want to use a query you can render the component as a react component, or set ::f.portal/wrap-root? false so your component will be the root and avoid the problems of requiring query.