【发布时间】:2020-04-10 14:51:42
【问题描述】:
我尝试使用这些代码将我的 ionic 应用程序连接到 apiserver (get)
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class EncryptionService {
url = 'https://api.am....com';
api-key='......'
constructor(private http: HttpClient) { }
newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}`);
}
}
我的 API 有 API 密钥并在 URL 中获取数据
- 如何以安全的方式执行这些操作? 例如防止有人监听和监控应用和服务器之间传输的数据?
- 防止某人分散注意力并通过应用伪造接收到的数据?
- 或者,任何使此连接安全的方法
【问题讨论】:
标签: javascript angular security ionic-framework penetration-testing