Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Recipe Actions don't work with Home Assistant due to incorrect content type header #3936

Closed
6 tasks done
michael-genson opened this issue Jul 24, 2024 · 0 comments · Fixed by #4163
Closed
6 tasks done
Labels
bug: confirmed bug Something isn't working

Comments

@michael-genson
Copy link
Collaborator

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

Due to how recipe actions are implemented, we currently send POST actions with the text/plain content type header. This is to get around a CORS preflight issue (since we might not get a response back).

Home Assistant requires using application/json to receive the webhook data. It may be as simple as having the backend do the POST request (instead of the frontend).

Steps to Reproduce

  1. Create a recipe POST action
  2. Send the request to HA
  3. Observe that the content can't be read (https://www.home-assistant.io/docs/automation/trigger/#webhook-trigger)

Please provide relevant logs

N/A

Mealie Version

nightly

Deployment

Docker (Synology)

Additional Deployment Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant