Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for serving multiple folders from a single HTTPD server #16

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Apr 22, 2015

  1. Configuration menu
    Copy the full SHA
    c50679b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea1b17e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    17f0062 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    081fab1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f48bb37 View commit details
    Browse the repository at this point in the history
  6. Dodgy hanging brace

    davyboyhayes committed Apr 22, 2015
    Configuration menu
    Copy the full SHA
    4731a76 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    89cda0f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4f48d8f View commit details
    Browse the repository at this point in the history
  9. app was crashing in Android with an NPE occasionally. According to lo…

    …gical, the NPE was due to the method being null. Reversing the order of the equality check covers this.
    davyboyhayes committed Apr 22, 2015
    Configuration menu
    Copy the full SHA
    8acbc23 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    16038c9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ae5865b View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2015

  1. Configuration menu
    Copy the full SHA
    e33ecd1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8bc4df View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2015

  1. Allow the HTTPD server to work in a proxy mode. If you define a custo…

    …m path pointing to http://... or https://... it will internally redirect the request to the remote server, and serve the response back to the user from the local server.
    
    For example:
    
    cordova.plugins.CorHttpd.startServer({
                        'www_root': '',
                        'port': 8080,
                        'localhost_only': false,
                        'custom_paths': {
                            '/imgur/': 'http://i.imgur.com/'
                        }
                    }, function(){console.log("SUCCESS");}, function(){console.log("FAILURE");});
    
    When you then fetch http://localhost:8080/imgur/TNZYux0.jpg, you will fetch the content from imgur, and serve it as if it came from your own domain.
    
    The reason for doing this... CrossDomain issues on image content served from an off device domain, and not wanting to apply unrestricted CORS access to all domains.
    
    NOTE:
    On iOS, this will download the entire contents of the response into memory before sending it on to the calling client. On Android, this is chunked in up to 16kb segments. Someone with more iOS experience than myself can probably make the iOS side of this behave more efficiently.
    davyboyhayes committed Jul 22, 2015
    Configuration menu
    Copy the full SHA
    d937b50 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2016

  1. Allowing for custom paths to be stacked from different locations (so …

    …/local/ can point to a local file based URL, but /local/game/ can point to a HTTP reference)
    davyboyhayes committed Feb 9, 2016
    Configuration menu
    Copy the full SHA
    8388c5b View commit details
    Browse the repository at this point in the history