Results 1 to 3 of 3

Thread: dynamic store proxy url

  1. #1
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    548
    Vote Rating
    44
      0  

    Default dynamic store proxy url

    on my local, the path to my 'in development' server side api is different than our production api. I need to be able to switch the prefix of my store proxys. the problem i'm having is that i can't put a variable into the URL property of the proxy using the Designer... easily done outside the designer.

    Is there a workaround or best practice?

    Thanks, John.

  2. #2
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Vote Rating
    1
      0  

    Default

    I'm guessing relative url's are not going to work for you, as in development you're api isn't in the same domain as your application. I usually set the proxy url's explicitly in code before use; here you can of course use var for base-url, which you can set once at launch. I don't love the solution, but it works for me.

  3. #3
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    548
    Vote Rating
    44
      0  

    Default

    Thanks, Joost. I decided to change the url of the stores proxy in the stores beforeLoad event. Would be much more convenient if a variable could be added to the url property in the designer pane but for now... it's easy to implement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •