# Integrating Cognex In-Sight SNAPP vision sensor SP2800 in Perspective Application

**URL:** <https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 19, 2024, 3:30pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813 "2024-08-19T15:30:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshi.pradnya06](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@joshi.pradnya06](https://forum.inductiveautomation.com/u/joshi.pradnya06)\
**Post date:** [August 19, 2024, 3:30pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/1 "2024-08-19T15:30:40Z")

</div>

Hello,

I am currently working on developing perspective application where in my objective for one of my screen involves integrating In-Sight SNAPP vision sensor SP2800 live camera monitor screen view into video player or similar kind of perspective components. The SNAPP vision Sensor uses web based UI called Cognex Device Discovery Utility to train the sensors. [http://192.168.1.XXX/Monitor](http://192.168.1.XXX/Monitor) is the link to the actual monitoring view of the camera and is in HTML5 format. Assigning this into video player source property does not work. I also spoke to Cognex tech support about this and they came with this probable solution:  
Because the Video Player component uses IFrame, which can cause issues loading some pages because of a security protocol “cross-origin resource sharing” (CORS).  
If you can find a way to disable the CORS restrictions in the Ignition’s server settings that may fix it.

Let me know how I can achieve this in perspective. Any different component or setting that can enable HTML5 access or do I go on disabling the CORS restrictions?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 19, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/2 "2024-08-19T16:09:40Z")

</div>

Well, Cognex tech support almost got it right, but unfortunately it's in the Cognex web server that CORS has to be enabled.

You might be able to set up a local reverse proxy or something like that, so that you point the Perspective iframe to the proxy instead.

Discussed in theory here: [Cognex Web HMI with iframe](https://forum.inductiveautomation.com/t/cognex-web-hmi-with-iframe/70030) and probably in other topics about iframe embedding issues.

---

<div class="post-metadata">

**Author:** ![joshi.pradnya06](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@joshi.pradnya06](https://forum.inductiveautomation.com/u/joshi.pradnya06)\
**Post date:** [August 19, 2024, 6:19pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/3 "2024-08-19T18:19:50Z")

</div>

I used Inline Frame component with the link [http://192.168.1.xxx/Monitor](http://192.168.1.xxx/Monitor) and it worked on large screen PC view. But the camera monitor view is not visible when viewed in perspective app on phone. Is there still need to set up local reverse proxy? Is yes then can you share steps to do that?

---

<div class="post-metadata">

**Author:** ![joshi.pradnya06](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@joshi.pradnya06](https://forum.inductiveautomation.com/u/joshi.pradnya06)\
**Post date:** [August 28, 2024, 8:10pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/5 "2024-08-28T20:10:29Z")

</div>

Can anyone throw some insights on this? I have no idea how to set up reverse proxy if required to. I searched on internet some videos but I do not have any networking knowledge and barely followed any steps in the videos so far. Is there any easy setup step video or content out there?  
The main goal here is to be able to access the live camera remotely into ignition perspective app using inline frame on any device on the network.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 28, 2024, 8:19pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/6 "2024-08-28T20:19:29Z")

</div>

This isn't really an Ignition question. Setting up a proxy (forward or reverse) is really an in-house IT question, as you will need `nginx` or `haproxy` or similar, outside Ignition. Such tools have their own documentation and their own user communities.

That you were able (in comment 3) to demonstrate it working on your LAN means both Ignition and the Cognex device are "happy". Fixing things for outside that network is purely an IT task.

---

<div class="post-metadata">

**Author:** ![joshi.pradnya06](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@joshi.pradnya06](https://forum.inductiveautomation.com/u/joshi.pradnya06)\
**Post date:** [September 5, 2024, 6:56pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/7 "2024-09-05T18:56:11Z")

</div>

By outside of network do you mean that outside of the device wherein ignition server is running? Because thats what is the issue. I can get access to camera from my PC where the igntion server is however not from mobile devices or other PCs running on the same company network.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 5, 2024, 7:45pm UTC](https://forum.inductiveautomation.com/t/integrating-cognex-in-sight-snapp-vision-sensor-sp2800-in-perspective-application/94813/8 "2024-09-05T19:45:30Z")

</div>

You have to use a URL in the Perspective IFrame that your corporate network understands and can route to the Cognex device. Outside Ignition.

_ **And** _ that Cognex device has to report CORS headers so your various browsers will permit it to show inside an IFrame. (If it doesn't already--your local test suggests it is OK.)

Let me repeat: Your network needs to route traffic directly from client browsers to your Cognex device using the URL in your Perspective IFrame component. If a proxy is required, it will be needed **outside** Ignition.
