👋 Using datomic cloud, I set an identity on a tuple composed of 2 attributes:
[:resource/a+b :tuple :one :unique :identity :attrs [:resource/a :resource/b]]
And I wonder if it's possible to activate the identity only if both of the attributes are present in the entity.
(and not only one of them like it seems to be)It is not possible. A composite tuple is asserted if any component attr is asserted and there’s no way to only assert the composite if all of them are asserted.
(That would be a really nice feature btw.)
@lanejo01 The deploy worked. Thanks for the tip. Reseting jetty in m2 solved it.
Great to hear! Always happy to chat
Ok no 🪄 so! Thanks for the answer 🙏
@lanejo01 I deployed and got a `.datomic-ions/` folder. Can that folder be put into `.gitignore` , or does it need to be pushed with git?
It can be ignored.
@lanejo01 Thanks. When deploying I got a lot of dependency-conflicts. Is there a way to update the depencencies running in my datomic cloud or do I need to explicit use the old dependency versions in my deps.edn to get rid of that warning?
The latter.
If you hit a conflict that you can't work around, contact support.
@lanejo01 I am responding to a GET request on the API gateway mapped on a lambda with ring.util.response/resource-response
to deliver the index.html
but the css and js are blocked by the browser with Content Security Policy: The page's settings blocked the loading of a resource
Is there a way to deliver a website with (pedestal)ion without errors?
Is there a way to expose resources in subfolder of `public` so the browser can fetch them when getting the `index.html` in a pedestal ion service?
I set :allowed-origins
which enables to load js and css in the public folder.
The images, js and css in public/[subfolder]/
produce 403
. I’m using an APIGW connected to a lambda that calls the ring routing as described in https://github.com/pedestal/pedestal-ions-sample
I allowed some origins, as the forum suggested. Now I’m stuck with subfolders not being loaded. Happy to hear how you solved that https://clojurians.slack.com/archives/C03RZMDSH/p1624475471307800
Are you running a local jetty server for development?
yes
And presumably the subfolders work with the same service-map?
during development I use integrant
the service map is different in development
Can you diff them?
this is the difference
(-> service
(dissoc ::http/chain-provider)
(assoc
::http/join? false
::http/routes #(route/expand-routes (deref #'routes))
::http/secure-headers {:content-security-policy-settings
{:default-src "'self'"
:style-src "'self' 'unsafe-inline'"
:script-src "'self' 'unsafe-inline'"}})
(http/default-interceptors)
(http/dev-interceptors)
(http/create-server))
should be the setup they do in peodestal-ions-sample