You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the library. Works well, except the following lines cause issues for me:
// Helps with the CORS issues.
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: POST, GET' );
header( 'Access-Control-Allow-Credentials: true' );
If this library is invoked after output has already occurred, then this warning will appear:
Warning: Cannot modify header information - headers already sent by (...) in /app/vendor/ahmadawais/sendy-php-api/src/API.php
Obviously there are ways I could work around that, but given that this is a client API, it's not appropriate for it to force server headers on me. (These headers do absolutely nothing unless the Sendy server is setting them.) Also it's quite possible that this library is used via CLI where there is not even the concept of headers to send.
In the meantime I have removed these lines locally but I prefer to not need to use a modified version of the library.
The text was updated successfully, but these errors were encountered:
Thanks for the library. Works well, except the following lines cause issues for me:
If this library is invoked after output has already occurred, then this warning will appear:
Obviously there are ways I could work around that, but given that this is a client API, it's not appropriate for it to force server headers on me. (These headers do absolutely nothing unless the Sendy server is setting them.) Also it's quite possible that this library is used via CLI where there is not even the concept of headers to send.
In the meantime I have removed these lines locally but I prefer to not need to use a modified version of the library.
The text was updated successfully, but these errors were encountered: