Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
How to secure my web widget embedded from third party website

I am creating web widget that can embed in other websites. Here is an example.

<script src="http://URL/searchWidget.js" type="text/javascript"></script>
<search-view name="search"></search-view>

I have some specific clients and only I am providing those widgets to those clients. So I need to secure those widgets from other third party websites. My Clients are using CMS, Joomla, Drupal.

If I give a widget(above script tag) to the client, only that client has access to that widget. If someone stolen that script, they cannot access that widget.

How can I do that ?
Is there any secure way to build widgets ?
can I do that using CMS plugin ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use this script in your javacsript to get current domain.

var scripts = document.getElementsByTagName("script");
SiteHostUrl = scripts[scripts.length-1].src;
jsUrl = SiteHostUrl;

Or you need give unique id for your client. You can access that ID and pass in ajax call verify the domain. if ID is not valid mean do not show your widget

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!