An open API service indexing awesome lists of open source software.

https://github.com/kanocomputing/cordova-plugin-protocol

Allows the creation of a custom protocol to serve files locally without using the file scheme
https://github.com/kanocomputing/cordova-plugin-protocol

Last synced: 22 days ago
JSON representation

Allows the creation of a custom protocol to serve files locally without using the file scheme

Awesome Lists containing this project

README

          

# Cordova Plugin Protocol

Allows the creation of a custom protocol to serve files locally without using the file scheme.

## Usage

Once the plugin installed, change the content location in your `config.xml`:

```xml

```

The host location can be anything as it is ignored while serving files locally, you just need to respect a url format.

To allow the scheme to be used, you will also need to add this configuration for the `cordova-plugin-whitelist`:

```xml

```

This will by default serve the files located in your `www` directory. You can change this by setting `Root` in the preferences:

```xml

```

You can also choose a different scheme by setting the `Scheme` preference:

```xml

```

If you do so, you will have to update the `content`, and `allow-navigation` directives too.