novuhq / novu-laravel

Laravel SDK for Novu
https://web.novu.co
MIT License
10 stars 6 forks source link

The 'api_url' setting in the novu.php configuration file gets ignored #3

Closed Vision42 closed 11 months ago

Vision42 commented 11 months ago

As the title says, the api_url setting gets ignored. This makes the Laravel package unusable with a self-hosted novu instance.

This is reproducible with the following steps:

  1. Set up a self-hosted novu instance locally via docker.
  2. Set up a blank Laravel project and install the novu/novu-laravel package.
  3. Update the api_url in config/novu.php to http://localhost:3000/v1/
  4. Make a simple request to novu. The request to novu will fail with the following error: API Key not found This is because of the novu SDK does not use the configured API url. Instead, it always uses https://api.novu.co/v1/, which is the hard-coded URL in the Novu\SDK\Novu class.

I have already a solution to this issue and will submit a PR shortly.

Vision42 commented 11 months ago

PR to this issue: #4