Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

242Studios's avatar

Restrict Form Post Data to Certain URL

Hi All,

I'm building an API/Webhook that can accept data sent by a form created in the JotForm.com service. So when a webform is submitted from the JotForm website, the data is also sent to a URL on my website which does some manipulation of the data. Is there a way to lock down the api so that only form posts sent from that particular JotForm address are processed?

0 likes
4 replies
prasadchinwal5's avatar

Hey @bahamagician, Looks like you need a middleware where you check if the request originates from the JotForm server. If not do not process the request.

You could do this using $request->headers

Then apply this middleware for your route or on your method.

242Studios's avatar

Sadly, I tried this but when I tried using $request->header('host') it returned the url of my api and not the jotform. Other than that, there's not any identifying headers sent with the request.

Http_429's avatar

The way I would handle this type of use case is to use an API key to secure my endpoint.

Please or to participate in this conversation.