0

I am using ngrok in order to test my Rails application integration with PayPal.

Since my application works with subdomains, I would like to detect when call is made from ngrok so I can apply a different behaviour.

Is there any way to configure ngrok to pass some information so I can detect the call comes from there? Or any other way to know that ngrok stands behind the call?

guyaloni
  • 4,972
  • 5
  • 52
  • 92

1 Answers1

1

Within your controller, you could check the request.host, which would have something related to ngrok somewhere there.

Or look at this older SO question which uses a route constraint.

Community
  • 1
  • 1
oreoluwa
  • 5,553
  • 2
  • 20
  • 27