[coldbox-4.0.0] ColdBox Proxy

I’m working on getting proxy working with CB 4. And I’m not sure about two items.

Our application runs under a subdomain “/ilsr2” however our path is “c:/ilsr2/ilsr”. If I understand the CB4 docs correctly, to use proxy services I need to set COLDBOX_APP_MAPPING to “ilsr2”. Is this correct?

Then I’m not sure how to call the CFC for the remote proxy. Right now, we do have SES turn off. I’m testing with the default proxy that comes with the advanced templates. So I’m testing the MyProxy.cfc in the remote directory.

Any direction would be greatly appreciated. Thanks.

> Our application runs under a subdomain “/ilsr2”

Do you mean sub directory?

> however our path is “c:/ilsr2/ilsr”.

I don’t understand what this means. Do you mean your web root for the site?

> If I understand the CB4 docs correctly, to use proxy services I need to set COLDBOX_APP_MAPPING to “ilsr2”. Is this correct?

That’s just so if the first request to the site after the server comes up is to a remote proxy, ColdBox will know where the root of the ColdBox app lives in relation to the web root. I don’t understand your directories enough to tell you if that is the correct setting for you though.

> Then I’m not sure how to call the CFC for the remote proxy.

You just hit the web-accessible path to the CFC. Based on my confusion surrounding the quotes above I don’t understand enough about your setup to tell you what it would be in your case.
Can you give us more information?

  • What URL have you hit?
  • What does your web root organization look like?
  • What happened when you hit that URL?
  • Did you receive an error?
  • Does the example app work?
    Also, do you actually need to use the remote proxy? They are really only required if you are using Flash Remoting or any of the built-in cf “ajax” tags. If you are just doing ajax calls via jQuery, or something similar, I would recommend you just call an event handler and use event.renderData() to return JSON or something.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,

Sorry for not getting back to you sooner.

I did mean sub directory, so the URL would be mydomain.com/ilsr2. We are running an older fusebox app under /ilsr. I was trying to provide the path to the application, because I wasn’t sure if I needed to set the COLDBOX_APP_MAPPING setting. We have a virtual directory created in IIS for /ilsr2, which is pointing to the app in c:/ilsr2/ilsr. If I’m reading the docs correctly, I need to set COLDBOX_APP_MAPPING=“ilsr2”.

As for running the proxy, if my URL is mydomain.com/ilsr2, and I’m using the sample CFC, should I be able to hit mydomain.com/ilsr2/remote/myProxy.cfc?

To give you some background on why we started looking at this approach, we are migrating the old fusebox app to CB4. This process is taking us awhile so we are looking to take advantage of some refactored code in the fusebox app, instead of having to maintain any changes in two locations. In the fusebox app, we have a module that we can drop into any form. This module, in this case, is image meta data. You can select an image to upload and enter meta data for the image. So you might have a form about cells, and we can use a cfmodule call to include the image form elements. Then on submission of the form, we have the normal data insert of the cell data, then another cfmodule call to process the image meta data.

So we are looking to see what we can do to replace non-refactored fusebox code and use the image module form data or process the image meta data code that had be refactored.

We had thought of the AJAX calls, which could work for the form, but I don’t think would work for processing the data.

Even if we don’t use proxy, I’d like to see the sample run for my own understanding.

Thanks,
Marc