/    Sign up×
Community /Pin to ProfileBookmark

Actual .JS file accessibility? Hide DB connection string?

I’m developing a Windows Sidebar gadget and am validating user data input client side via HTML and JS. Data is being validated via remote server DB.

To my problem… DB connection string is currently visible to everyone. Is there any way I can hide it? Perhaps by putting my JS file to a server and protecting it somehow?

Thank you!

-gavio

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@svidgenApr 08.2011 — You'll need/want your widget to establish it's database connections via a web service of some sort. Never send your "global" server-side credentials with the client code!
Copy linkTweet thisAlerts:
@gavioauthorApr 09.2011 — I know web services would solve this problem. However, I don't really want to re-write all my code since there's so much of it. Is there ANY solution for my problem, leaving most of the code as it is?
×

Success!

Help @gavio spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...