mosescha1972 opened a new issue, #38460:
URL: https://github.com/apache/superset/issues/38460

   Instead of hardcoding the webhook URL inside the proxy server, it would be 
better to pass the full webhook URL through an HTTP header from Superset.
   
   For example, Superset could include a custom header such as:
   
   Webhook-URL: http://xxx.xxx.xxx.xxx:xxxx/hooks/9uqchfp11brwmf6rxjbgdsdqae
   
   The proxy server can then read this header and send the request directly to 
that URL.
   
   Example in Python:
   
   webhook_url = request.headers.get("X-Webhook-URL")
   
   response = requests.post(
       webhook_url,
       json=payload
   )
   
   Advantages of this approach:
   
   The webhook URL is no longer hardcoded in the proxy server.
   
   Different Superset alerts can send notifications to different webhook 
channels.
   
   The proxy server remains generic and reusable without configuration changes.
   
   Maintenance becomes easier because the destination webhook can be controlled 
from the Superset configuration.
   
   This makes the webhook proxy more flexible and scalable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to