How to set cookie attributes for JWT-Token and XSRF-Token in services?

We had a pentest for our application and the result stated that we should set cookie attributes for the JWT token and the XSRF token. How can I set the secure, http only and same origin of these cookies in services where these cookies are created?

also see <INTERNAL_LINK>

Unfortunately we cannot set those cookies as http only because in our TS layer we need to intercept them. Without this layer the services would not be able to provide any typescript functionality and mapping of its rest interfaces

Can you please elaborate on what the typescript layer really needs? We have manually set the JWT-Token to httpOnly and secure and the XSRF-Token to secure and didn’t experience any problems.