Skip to content

Commit

Permalink
add api settings for reports
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Dec 9, 2024
1 parent 5fabdf8 commit 6bcb65d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/ee/reporting/functions/tipsntricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,24 @@ Right click on a client or site to quickly run/download a report.
<div class="video-wrapper">
<iframe width="400" height="225" src="https://www.youtube.com/embed/-aS6K047Zbc?si=da6s4qyWgncc3Pdn" frameborder="0" allowfullscreen></iframe>
</div>

## Making API Calls from Within a Report Template

If you plan to make API calls (e.g., using axios or fetch) from within a report template, you need to configure additional settings to ensure proper functionality:

Append the following code to `/rmm/api/tacticalrmm/tacticalrmm/local_settings.py`:

```python
from corsheaders.defaults import default_headers

CORS_ALLOW_HEADERS = (
*default_headers,
"x-api-key",
)
```

Then restart the rmm service:

```bash
sudo systemctl restart rmm
```

0 comments on commit 6bcb65d

Please sign in to comment.