diff --git a/docs/ee/reporting/functions/tipsntricks.md b/docs/ee/reporting/functions/tipsntricks.md index d03c44c6..5a77e797 100644 --- a/docs/ee/reporting/functions/tipsntricks.md +++ b/docs/ee/reporting/functions/tipsntricks.md @@ -19,3 +19,24 @@ Right click on a client or site to quickly run/download a report.
+ +## 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 +```