V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
? Ionic
pandada8
V2EX  ?  Ionic

Ionic 可以做到无视 CORS 吗

  •  
  •   pandada8 · 2015-05-07 16:21:52 +08:00 · 7615 次点击
    这是一个创建于 3284 天前的主题,其中的信息可能已经有所发展或是发生改变。

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    文档似乎说可以啊……然而我在我的 MIUI 上并没有试验成功……
    顺便服务端不可控而且对源 IP 敏感……

    4 条回复  ?  2015-06-17 20:49:11 +08:00
    clker
        1
    clker  
       2015-05-07 17:55:55 +08:00
    你可以先搜索下吗
    pandada8
        2
    pandada8  
    OP
       2015-05-07 20:08:36 +08:00
    @clker
    Running on a device
    What happens when you run ionic run?

    Your files for the app are copied to the device (or simulator).
    The app runs, thus firing a browser on the phone/simulator to run the files that were copied over, something like: file://some/path/www/index.html.
    Your origin will not exist, since you are running off of a file:// URI; therefore, any request outwards will not require a CORS request.
    然而我没开任何的live reload,在设备上和模拟器都无法发请求
    xylitolLin
        3
    xylitolLin  
       2015-05-07 23:20:57 +08:00
    把那个<meta access-orgin......>(忘了具体是什么),删了不行吗?
    wangxiao2015
        4
    wangxiao2015  
       2015-06-17 20:49:11 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   741 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 21:41 · PVG 05:41 · LAX 14:41 · JFK 17:41
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com