1
Request origin isn't passed in the accountability object
Source: directus/directus#25738 · opened by @BramG
Summary
On auth.login the origin is available in the accountability object but it's not available anymore later in the chain.
Currently I hack the system by appending the hostname at the end of the user agent string in my nginx config as this property get's passed properly.
This is a very dirty workaround.
Basic Example
_No response_
Motivation
When building a multidomain setup the origin is vital to create proper item.query and item.create hooks that can filter on the current domain.
Detailed Design
Ensure that the origin doesn't get removed, pass it along just like the IP and the user agent.
Requirements List
Must Have:
• an origin property on the accountability object in every filter
Drawbacks
/
Alternatives
Find another way to fetch the origin in hooks.
Adoption Strategy
Not a breaking change, it's an extra property
Unresolved Questions
_No response_
On auth.login the origin is available in the accountability object but it's not available anymore later in the chain.
Currently I hack the system by appending the hostname at the end of the user agent string in my nginx config as this property get's passed properly.
This is a very dirty workaround.
Basic Example
_No response_
Motivation
When building a multidomain setup the origin is vital to create proper item.query and item.create hooks that can filter on the current domain.
Detailed Design
Ensure that the origin doesn't get removed, pass it along just like the IP and the user agent.
Requirements List
Must Have:
• an origin property on the accountability object in every filter
Drawbacks
/
Alternatives
Find another way to fetch the origin in hooks.
Adoption Strategy
Not a breaking change, it's an extra property
Unresolved Questions
_No response_
No pledges yet. Be the first to back this.
Comments
Similar requests
A way for a hook to identify root calls
1 vote · 0 comments
Flows: Improve the Log Activity Panel
29 votes · 0 comments
Embeddable insights view #15774
1 vote · 0 comments
Pass selected items to a flow in a detail item page
2 votes · 0 comments
Access to e.g. getAccountabilityForRole and ItemsService in @directus/extensions-sdk
2 votes · 0 comments
No comments yet.