-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(UST-1374): middleware-headers extension #7154
base: main
Are you sure you want to change the base?
Conversation
|
The extension also ships with a predefined `cacheControlRules` value. You can opt-in to using this by setting `cacheControl` to true. | ||
|
||
```typescript | ||
/* This is just for presentation purposes; the code is part of the package internals. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to explain what this value is in the docs? People would probably want to know before implementing it and it would be nicer to have here rather than making them dig through source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattmaribojoc You have it down below.
The Middleware Response Headers [extension](/middleware/guides/extensions) enables the addition of custom response headers, which can be particularly useful for managing application caching or establishing security rules. | ||
|
||
With this extension, you can overwrite or set headers for specific API methods or apply them globally across your application. | ||
It can be implemented for any Unified Alokai Backend integration that exposes API methods and allows the addition of custom headers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does a developer know if this is the case? Is it documented in each integration?
and allows the addition of custom headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohrig Well, you'll notice where and when your headers were applied, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, let me be more clear. The docs state "It can be implemented for any Unified Alokai Backend integration that exposes API methods and allows the addition of custom headers.
"
How does the develop know if a given integration allows the addition of custom headers
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohrig All of the middleware allows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your suggestion? Should I mention that? Where are we heading here? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a legitimate question. If certain criteria must be met for this to be the case, then tell the developer how they can check it. If all integrations allow it then I would just say that. π
Co-authored-by: Richard Rohrig <45824492+rohrig@users.noreply.github.com>
Co-authored-by: Richard Rohrig <45824492+rohrig@users.noreply.github.com>
π Linked issue
Internal task.
β Type of change
π Description
This PR provides documentation for the
@vsf-enterprise/middleware-headers
package.π Checklist