To use AngularJS in my app I have to expose an API publicly, and data is the USP of my application. I don't want someone to easily use all the data. Is there any alternative?
-
-
Answer:
Use a middle layer of Node.js ( Express Framework ) to call your api securely. So maybe if you have a model with 6 sub models associated with it, you can call and aggregate that data at one place and let AngularJS call this route which have aggregated data. It will save your users multiple REST calls request and website response time will be much faster. This way you can secure the Rails routes to be directly get called and exposed. Use UUID for primary key which prevents users not able to guess next id and can save you. Save IP address of user and generate a token based on that. Use Session based API requests. And trust me, whatever maybe the situation, there is always a way to scrap data from a website unless it's a protected website which requires a login. So, I guess you should focus on building the product and let it go because someone who is a good scraper can really collect all your data no-matter what just like a good hacker can get into facebook, twitter and look at users data. I have scrapped Zomato data and their website is secure in my opinion :)
Piyush Chauhan at Quora Visit the source
Other answers
You can have a separate backend let's say ror. Then after you just need to write promises as part of angular services. This is how you can keep ur data safe by using some secure db at backend
Aditya Sethi
Related Q & A:
- How can you erase a link on the tab that I don't want to have anymore?Best solution by Yahoo! Answers
- Is there any way I can get my MSN password back if I don't know the secret question that it asks?Best solution by Yahoo! Answers
- Has anyone used SideStep.com or Kayak.com? Are they reputable, we don't want to get ripped off!! Please reply?Best solution by Yahoo! Answers
- How should I deal with people I don't like at work?Best solution by time.com
- How do I find a certain tv channel if I don't know what number it is?Best solution by timewarnercable.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.