Sounds good to me! By the way, I filed a bug to track the proxy policy API change: http://jira.openlaszlo.org/jira/browse/LPP-6058

Can you file one for doing the same with the proxyhost attribute?  Thanks!

Henry Minsky wrote:
A related issue, it would be nice to be able to specify the URL of the proxy host, instead of it being hardcoded to be the app url. How about a proxyhost attribute that you can set in a similar manner?



On Wed, May 28, 2008 at 3:00 PM, Max Carlson <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Folks,

    I was thinking of deprecating the LzView.add/removeProxyPolicy()
    APIs in favor of a new, simpler system.  The current API looks like
    this:

    LzView.addProxyPolicy ( f )
    Adds a function which can decide how the media at a given URL should
    be loaded
    @param Function f: A function that takes a URL as a string and
    returns one of true, false, or null meaning respectively that the
    request should be proxied by the LPS server; made directly to the
    URL; or should be passed to the next policy function in the list.
    The default policy function returns the value of canvas.proxied

    LzView.removeProxyPolicy ( f )
    Removes a proxy policy function that has been added using
    LzView.addProxyPolicy
    @param Function f: The function to remove from the policy list
    @return Boolean: Returns true if the function was found and removed,
    false
    if not

    Instead, each view would be able to set its own proxy policy.  If a
    view does not have an explicit proxy policy set, it looks up the
    parent chain until it finds one.  The canvas always has a default
    proxy policy set. Views can change their proxy policy like this:

    anyview.setProxyPolicy ( f )
    Sets a proxy policy function on a per-view basis.
    @param Function f: The function to use for this view's proxy policy

    Let me know what you think!

-- Regards,
    Max Carlson
    OpenLaszlo.org




--
Henry Minsky
Software Architect
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>


--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to