How can I set multiple distribution key on one server?

Posted by: t.kurosawa.ed on 27 May 2019, 4:08 am EST

  • Posted 27 May 2019, 4:08 am EST

    I need to set multiple distribution license key on one application server.

    Because the application server change subdomain depending on user location.

    e.g.

    from china user → www.app.com.cn

    from japan user → www.app.com.jp

    Can I register multiple key on one license key file ?

    e.g.

    GC.Spread.Sheets.LicenseKey = “www.app.com.cn,xxxxxxxxxxxxxxxxx・・・・・・・・”;

    GC.Spread.Sheets.LicenseKey = “www.app.com.jp,yyyyyyyyyyyyyyyyyy・・・・・・・・”;

  • Posted 28 May 2019, 12:37 am EST

    Hi,

    Only one deployment key could be used per application. But you could apply different keys based on different location using window.location API. Please refer to the following code snippet:

    let hostName = window.location.hostname;
    let key = null;
    if(hostName == 'hostName1'){
    	key = "Key_for_host_1";
    }else if(hostName == 'hostName2'){
    	key = "Key_for_host_2";
    }else if(hostName == 'hostName3'){
    	key = "Key_for_host_3";
    }
    GC.Spread.Sheets.LicenseKey = key;
    

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels