Skip to content

Commit

Permalink
docs: removed outdated information about cors configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodigo authored and bartoszherba committed Oct 12, 2022
1 parent 103b61f commit d25560e
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions docs/installation-setup/configure-magento.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,45 +84,7 @@ Then go to the admin panel, find the configuration panel of the `GraphQL CustomC

For more information, see the [GraphQL security configuration](https://devdocs.magento.com/guides/v2.4/graphql/security-configuration.html) page.

### 5. Enable CORS

You may need to enable CORS origins in your Magento store to accept requests from other domains, e.g., `magento.dev`. In the Magento 2 folder, add the package `graycore/magento2-cors` by running the command below:

```sh
bin/composer require graycore/magento2-cors
```

Then, add the following configuration at the end of `src/app/etc/env.php`:

```php
'system' => [
'default' => [
'web' => [
'graphql' => [
'cors_max_age' => 86400,
'cors_allow_credentials' => 0,
'cors_allowed_methods' => 'POST, OPTIONS, GET',
'cors_allowed_headers' => 'Content-Currency, Store, X-Magento-Cache-Id, X-Captcha, Content-Type, Authorization, DNT, TE',
'cors_allowed_origins' => '*'
]
]
]
]
```

Enable the graycore cors.

```sh
bin/magento module:enable Graycore_Cors
```

Then update the configuration:

```sh
bin/magento setup:upgrade
```

### 6. Populate store with sample data (optional)
### 5. Populate store with sample data (optional)

In the Magento 2 folder, execute the commands below to add sample data to your store.

Expand Down

0 comments on commit d25560e

Please sign in to comment.