langflow-ai / langflow-embedded-chat

The Langflow Embedded Chat is a powerful web component that enables seamless communication with the Langflow
43 stars 17 forks source link

Inject additional headers #10

Closed yassineselmi closed 4 months ago

yassineselmi commented 7 months ago

This PR offers the possibility to inject additional headers to the Langflow request. The main motivation behind this is to allow the user to send custom headers to bypass WAF or Security guardrails, as well as enforce CORS policies.

Example of usage:


<langflow-chat
    chat_input_field="input"
    chat_inputs='{"input":""}'
    host_url="langflow url"
    flow_id="your_flow_id"
    additional_headers='{"Access-Control-Allow-Origin": "myserver.com", "CF-Access-Client-Id": "1235678"}'
  ></langflow-chat>
anovazzi1 commented 4 months ago

lgtm