Reputation: 2106
I have these .Net RESTFull GET APIs that contain query string. Ex: https://my.api.com/employee/get?empId=123&uId=234&type=456
The security team of my customer tested my product. They dont want to expose the plain value of empId
and uId
query parameter when they inspect the nextwork tab in Chrome dev tool (press F12).
I used ajax to call these APIs from web client to .Net Web API Server.
How can I protect the query string parameter value? Which way to easy encode parameter from ajax calling and decode from API Server?
Upvotes: 0
Views: 255
Reputation: 76
You already have the answer, that is encrypt the querystrings. So basically you need to encrypt in js and decrypt in c#. You can use AES algorithm a sample is available here
Upvotes: 1