Skip to content

Commit

Permalink
feat(docs): augment docs for configuring Commerce Cloud (#87)
Browse files Browse the repository at this point in the history
Adds links to Adobe documentation and an example image.
Example image is nice because the syntax is weird.

fixes #78, fixes #79
  • Loading branch information
jburnumHVT authored Oct 10, 2024
1 parent 2081120 commit d9f7f69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/stories/configuring-the-headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ We provide several configuration keys for you to configure. The configurations b
* `web/api_rest/cors_expose_headers` - A comma separated list that indicates which headers can be exposed as part of the response.
* `web/api_rest/cors_allow_credentials` - Whether to allow credentials on CORS requests

### Configuring for local or on-premises installations

You can add the following to your `app/etc/env.php` to configure the package.

```php
Expand Down Expand Up @@ -50,6 +52,11 @@ return [
> You can also optionally set the `cors_allowed_origins` key to `*` if you want to allow ALL origins access to the resource, but we strongly suggest you [understand the ramifications of this before doing so.](/docs/stories/no-wild-card.md)
Note also that the CORS specification disallows a wildcard for Allowed Origins if the `cors_allow_credentials` flag is enabled. If this is the case, the server will instead echo the request Origin back as the Allow-Origin value.

### Configuring for Commerce Cloud

In Commerce Cloud environments, the app/etc/env.php file is unavailable for configuring this module. Instead, use the cloud UI to set ENV settings, as documented at https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/configure/env/variable-levels.html and https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/paths/override-config-settings.
Here's an example of syntax for the cors_allowed_methods value:
![Image from Commerce Cloud UI](./examples/cors_allowed_methods-in-cloud.jpg)

## Examples
* [PWAs (Angular, PWA Studio, etc)](./examples/pwa-configuration.php)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9f7f69

Please sign in to comment.