Serving Connect from a Local Location

If you need to host the IBM Aspera Connect Plug-in SDK installers locally, you can download the Connect SDK file and configure Shares to point to a local copy of the Connect SDK hosted at a non-standard location. In this way, users download Connect from a server of your choice.
  1. Download the Connect SDK zip file from the Aspera Developer Network.
  2. Create the directory, /opt/aspera/shares/u/connect-sdk, and extract the contents of the connect SDK into this directory.
  3. Create a Connect Nginx configuration file named "connect-sdk" at /opt/aspera/shares/etc/nginx/locations-available/connect-sdk with the following content:
    location /connect/ {
      alias /opt/aspera/shares/u/connect-sdk/;
      expires 1d;
    }
  4. Create a symlink between the connect-sdk file and the locations-enabled folder so Nginx includes the configuration file.
    # ln -s /opt/aspera/shares/etc/nginx/locations-available/connect-sdk /opt/aspera/shares/etc/nginx/locations-enabled
  5. Point Shares to the new Connect SDK location by editing the file at /opt/aspera/shares/u/shares/app/views/node/shared/_aspera_web_plugin_install.html.haml.
    Change the following line to one of two options:
    - connect_autoinstall_location = '//d3gcli72yxqn2z.cloudfront.net/connect/v4'
    • Programmatically set the domain name of the server.
      - connect_autoinstall_location = "//#{ request.host_with_port }/connect/v4"
    • Manually set the domain name of the server. Replace shares.example.com with the Shares server domain.
      - connect_autoinstall_location = '//shares.example.com/connect/v4'
    Find the following line under function loadConnectScript:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.min.js';
    Replace it with the line below:
    var url = window.location.protocol + CONNECT_AUTOINSTALL_LOCATION + '/' + script + '.js';
  6. Update the Nginx configuration file located at opt/aspera/shares/etc/nginx/
    Find the following line:
    add_header X-Frame-Options DENY;
    Replace it with:
    add_header X-Frame-Options SAMEORIGIN;
  7. Restart Shares and Nginx.
    # service aspera-shares restart
    # killall -HUP nginx
Your Shares server is now hosting Connect and installers.
Note: You may need to clear your browser cache in order for these changes to take effect.