英文:
Cordova app how to change the Android ORIGIN header value
问题
在iOS中,我的应用程序的HTTP请求标头为Origin: ionic//myapp
。
在Android中,我的应用程序的HTTP请求标头为:Origin: http://localhost
。
我如何将Android的Origin值更改为类似iOS,或只列出我的应用程序名称?- localhost 似乎没有用。
英文:
In iOS, my app HTTP request headers have Origin: ionic//myapp
In Android, my app HTTP request headers are: Origin: http://localhost
How can I change the Android Origin value to be like iOS and/or just list my app name? - localhost seems useless.
答案1
得分: 1
我只会回答 Cordova 部分。由于您没有提到版本,不确定这对您是否适用。您可以在首选项中设置方案和主机名,例如
<preference name="scheme" value="https" />
<preference name="hostname" value="whatever" />
英文:
I will answer for Cordova only. Since you didn't mention the version, not sure this will work for you. You can set a scheme and hostname in preferences, such as
<preference name="scheme" value="https" />
<preference name="hostname" value="whatever" />
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论