# Configuration

Lighthouse comes with sensible configuration defaults and works right out of the box. Should you feel the need to change your configuration, you need to publish the configuration file first.

php artisan vendor:publish --tag=lighthouse-config

The configuration file will be placed in config/lighthouse.php.


A GraphQL API can be consumed from multiple clients, which may or may not reside on the same domain as your server. Make sure you enable Cross-Origin Resource Sharing (CORS) (opens new window) for your GraphQL endpoint in config/cors.php:

return [
-   'paths' => ['api/*'],
+   'paths' => ['api/*', 'graphql'],

CORS is built into Laravel starting from version 7, for previous versions use https://github.com/fruitcake/laravel-cors