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

Ionic 可以做到无视 CORS 吗

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

    文档似乎说可以啊……然而我在我的 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   ·   我们的愿景   ·   实用小工具   ·   1002 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:51 · PVG 03:51 · LAX 12:51 · JFK 15:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.