Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:35:46+00:00 2026-06-07T05:35:46+00:00

I am building an API(PHP) which allows access only by domain names, how should

  • 0

I am building an API(PHP) which allows access only by domain names, how should I check the JSONP request origin?
And are there any security layers I could Implement? (I am not using keys currently*)

* = I want the users only to add the script tag, I don’t want them to have to insert keys and get messed up – if you have any idea to make that happen and secure it I would be delighted to hear it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:35:47+00:00Added an answer on June 7, 2026 at 5:35 am

    The best you are going to get is to:

    Accept the request if the referer header is missing or set to a URL with a domain on your whitelist.

    This will stop people effectively using your API client side on HTTP sites.

    Some (relative small number of) users will have referers disabled. They will be able to use the API on any site that uses it (but since they are a minority, most sites won’t want to depend on this as it will simply break for the majority of users).

    It won’t stop people running an HTTPS website and using the API – but their users will be warned about a mix of secure and insecure content, so this is also an unattractive option.

    This won’t stop people hitting your API server side, but you can combat that with IP based rate limiting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an API in PHP. One of the methods is place.new (PUT request).
I am building an API which I intend to upgrade over time. Is it
I am building a Web API using MVC4 and some request return blocks of
I'm building a batch request for the Facebook API by looping the following code:
I'm building an API using PHP. What do I need to do to recognize
I'm building a simple PHP class that will allows you to enter your twitter
I'm researching the idea of building a super-small (preferably PHP) web app, which will
I am working on building an REST API in PHP, I need to know
I'm building classes that interface with the Twitter API, and I'm wondering whether PHP's
I'm building out an API and have a question about how to track/know which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.