Hello there, I need help regarding <https://www.or...
# talk-kratos
f
Hello there, I need help regarding https://www.ory.sh/kratos/docs/guides/multi-domain-cookies/ my frontend URL is devapp.domain.com and my api url is dev-api.domain.com graphql is implemented for backend APIs, and now "cookie" request header is not getting added for dev-api.domain.com backend APIs can anyone please help. thanks.
d
Hello. Could you please share you kratos config?
Usually it’s enough to have this configuration for cookies:
Copy code
session:
  cookie:
    # Overrides cookies.domain for session cookies
    domain: <http://domain.com|domain.com>
NB: Kratos uses only httpOnly cookies and requires TLS configuration unless you use
--dev
flag to run
f
@User here is my kratos config file, please have a look once and let me know what can be the best way to manage cookies on both domains https://devapp.stackways.io/ https://dev-api.stackways.io/ backend APIs are unable to send cookie header in request headers.
d
Hello. I took a took at your config file and it seems that you need to add your domain to
session
configuration section
Copy code
session:
  cookie:
    domain: <http://stackways.io|stackways.io>
  whoami:
    required_aal: aal1
In your config file the domain is missing. You can read more here: https://www.ory.sh/kratos/docs/guides/configuring-cookies
I hope this helps
f
Hello @User , thanks for the update, let me try this out.
d
Copy code
session:
  cookie:
    domain: <http://stackways.io|stackways.io>
  whoami:
    required_aal: aal1

serve:
  public:
    domain_aliases:
// Add your domains
https://www.ory.sh/kratos/docs/guides/multi-domain-cookies/