Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
- [Splunk Enterprise](guides/app_builder_guides/application_logging/splunk-enterprise.md)
- [Configuration](guides/app_builder_guides/configuration/configuration.md)
- [Sequences](guides/app_builder_guides/configuration/sequences.md)
- [Webpack Configuration](guides/app_builder_guides/configuration/webpack-configuration.md)
- [Webpack Configuration](guides/app_builder_guides/configuration/webpack-configuration.md)
- [Setting CDN Response Headers](guides/app_builder_guides/configuration/cdn-response-headers.md)
- [Deployment](guides/app_builder_guides/deployment/deployment.md)
- [CI/CD overview](guides/app_builder_guides/deployment/cicd-for-app-builder-apps.md)
- [CI/CD using Github Actions](guides/app_builder_guides/deployment/cicd-using-github-actions.md)
- [Custom CI/CD pipeline](guides/app_builder_guides/deployment/cicd-custom.md)
- [Credential Rotation](guides/app_builder_guides/deployment/credential-rotation.md)
- [Setting Response Headers](guides/app_builder_guides/deployment/setting-response-headers.md)
- [Development](guides/app_builder_guides/development.md)
- [Distribution](guides/app_builder_guides/distribution.md)
- [Events](https://developer.adobe.com/events/docs/guides/using/custom_events/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
keywords:
- cli
- response headers
title: Setting Response Headers
title: CDN Response Headers
description: How to set response headers for your static assets
---

# Setting Response Headers
# CDN Response Headers

For applications with UI, static assets such as HTML, Javascript, css, and images are served by the Content Content Delivery Network through the `adobeio-static.net` domain. App Builder has supported setting response headers for this static content since aio-cli version 9.3.0.

This feature applies to any App Builder applications with UI, and is helpful for use cases such as:

- Setting `CORS` Headers to enforce access policies
- Controlling web-assets caching behavior via [`Cache-Control` headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)
- Enabling `Content Security Policy` for assets
- Adding any `custom headers` required by the application UI

Expand Down Expand Up @@ -50,6 +51,9 @@ application:
Content-security-policy: default-src 'self'
/lib/sample.js: # add headers to specific ile
Content-security-policy: default-src 'self' example.com *.example.com
/*.png:
# cache all png files for 1 hour at CDN level and 1 minute in browser
cache-control: s-maxage=3600, max-age=60
```

Once headers are added, they can be deployed with the app using the `aio app:deploy` command. Note that the paths specified in rules are relative to the distributable folder created after the application build, and not to the application root.
Expand Down Expand Up @@ -78,29 +82,28 @@ Listed headers are ignored because they are either meant for internal use or are
2. age
3. allow
4. alt-svc
5. cache-control
6. connection
7. content-length
8. content-type
9. content-disposition
10. content-encoding
11. content-language
12. content-length
13. date
14. etag
15. expires
16. last-modified
17. location
18. server
19. trailer
20. transfer-encoding
21. upgrade
22. x-cache
5. connection
6. content-length
7. content-type
8. content-disposition
9. content-encoding
10. content-language
11. content-length
12. date
13. etag
14. expires
15. last-modified
16. location
17. server
18. trailer
19. transfer-encoding
20. upgrade
21. x-cache

## Next steps

This concludes the Deployment section.
This concludes the Configuration section.

Return to [Deployment Overview](deployment.md).
Return to [Configuration Overview](configuration.md).

Return to the [Guides Index](../../index.md).
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ web: <path to web folder>
unitTest: <path to unit test folder>
e2eTest: <path to e2e test folder>
dist: <path to build output folder>
htmlCacheDuration: <cache duration for UI .html files, default: 60s>
jsCacheDuration: <cache duration for UI .js files, default: about a week>
cssCacheDuration: <cache duration for UI .css files, default: about a week>
imageCacheDuration: <cache duration for UI image (.jpg, .png, .gif, etc.) files, default: about a week>
tvmurl: <alternative tvm url used to upload the UI>
awsaccesskeyid: <upload UI to own s3, provide credentials>
awssecretaccesskey: <upload UI to own s3, provide credentials>
Expand Down Expand Up @@ -424,5 +420,6 @@ If you can't view your application in the App Builder Catalog of Adobe Experienc
Learn more about:
- [Configuring Sequences](sequences.md) - Chain actions together declaratively
- [Webpack Configuration](webpack-configuration.md) - Customize your build process
- [Configuring CDN Response Headers](cdn-response-headers.md) - Customize your web-assets response headers

Return to [Guides Index](../../index.md).
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,3 @@ runtimeManifest:
## Next Steps

Learn more about [Webpack Configuration](webpack-configuration.md) or return to the [Configuration Overview](configuration.md).

Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ module.exports = (env) => ({

## Next steps

Learn more about [CDN Response Headers](cdn-response-headers.md)

Return to [Configuration](configuration.md).

Return to [Guides Index](../../index.md).
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Again, it is critically important to pass all parameters in a single `update` ca

## Next steps

Continue to [Setting Response Headers](setting-response-headers.md).
This concludes the Deployment section.

Return to [Deployment Overview](deployment.md).

Expand Down
36 changes: 24 additions & 12 deletions src/pages/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,6 @@
"Source": "/app-builder/docs/guides/app_builder_guides/events/custom-events/",
"Destination": "/app-builder/docs/guides/app_builder_guides/events/custom-events"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers/",
"Destination": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/deployment/",
"Destination": "/app-builder/docs/guides/app_builder_guides/deployment/deployment"
Expand All @@ -851,6 +847,22 @@
"Source": "/app-builder/docs/guides/app_builder_guides/configuration/configuration/",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/configuration"
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check with @timkim to add/remove these redirects
these client side redirects are going away #445 and will only be set in fastly now.

"Source": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers/",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers/",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting_response_headers",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/architecture_overview/using-sdks/",
"Destination": "/app-builder/docs/guides/app_builder_guides/architecture_overview/using-sdks"
Expand Down Expand Up @@ -1099,14 +1111,6 @@
"Source": "/app-builder/docs/guides/app_builder_guides/application_logging/azure_log_analytics",
"Destination": "/app-builder/docs/guides/app_builder_guides/application_logging/azure-log-analytics"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting_response_headers/",
"Destination": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/setting_response_headers",
"Destination": "/app-builder/docs/guides/app_builder_guides/deployment/setting-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/deployment/credential_rotation/",
"Destination": "/app-builder/docs/guides/app_builder_guides/deployment/credential-rotation"
Expand All @@ -1131,6 +1135,14 @@
"Source": "/app-builder/docs/guides/app_builder_guides/configuration/webpack_configuration",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/webpack-configuration"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/configuration/cdn_response_headers/",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/configuration/cdn_response_headers",
"Destination": "/app-builder/docs/guides/app_builder_guides/configuration/cdn-response-headers"
},
{
"Source": "/app-builder/docs/guides/app_builder_guides/exc_app/aec_integration/",
"Destination": "/app-builder/docs/guides/app_builder_guides/exc_app/aec-integration"
Expand Down