Secure communication between JavaScript and a Web service in PHP

前端 未结 1 375
借酒劲吻你
借酒劲吻你 2021-01-22 00:45

I want to make a web service ( with post,get,delete - REST ) and 2 clients for it. The first client will be on JavaScript and he will need to comunicate with the web service and

相关标签:
1条回答
  • 2021-01-22 00:53

    Here are some options (though I imagine you are already considering these):

    1. As deceze mentions, you can create a self-signed cert. I have done it several times. Here is a good how-to/tutorial. If you are in Windows, then the question that Farray mentioned might be helpful.

    2. Though difficult to do correctly, you can encrypt your data before transferring it, but this adds a lot to your code, especially since you need to do it at the service server AND two different clients. It will be especially difficult to do with javascript (but it CAN be done, see Kevin Vaughan's answer to this question).

    0 讨论(0)
提交回复
热议问题