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
- Host: GitHub
- URL: https://github.com/kanocomputing/cordova-plugin-protocol
- Owner: KanoComputing
- Created: 2018-02-22T15:37:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T16:39:54.000Z (about 8 years ago)
- Last Synced: 2025-01-13T12:46:14.642Z (over 1 year ago)
- Language: Swift
- Size: 6.84 KB
- Stars: 1
- Watchers: 22
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.