Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| indigo_2023.2_documentation:indigo_web_server [2024/01/27 19:24] – [Local Secrets] davel17 | indigo_2023.2_documentation:indigo_web_server [2025/04/14 20:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Indigo Web Server ====== | ||
| + | The Indigo Server contains a fully-functioning web server that you can use to serve content locally or via the Indigo Reflector Service (the Reflector requires an active Indigo Up To Date subscription). | ||
| + | |||
| + | ==== Advanced Web Server Settings ==== | ||
| + | |||
| + | {{: | ||
| + | |||
| + | In Indigo 2023.2, an '' | ||
| + | - Debug Logging: Enable this setting to show extra Web Server debugging information. | ||
| + | - Hide Security Logging: Enable this setting to hide HTTP API connection attempts. <color red> | ||
| + | - Cache Controls: If you are having issues with cached API Keys (not Local Secrets), use the button to clear the key cache. This will force Indigo to connect to your Indigo Account to validate the next transaction which contains an API Key. | ||
| + | ==== Web Assets Folder Structure ==== | ||
| + | Indigo 2023.2 contains special folders that are accessible to the Indigo Web Server which are located in: | ||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | There are four stock folders located under this parent folder: | ||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | As a convenience, | ||
| + | |||
| + | All assets you want to make available to the Indigo Web Server should be stored in these folders. | ||
| + | |||
| + | === images folder === | ||
| + | This folder is used to publish files and make them available in the Indigo UI for use in control pages (and for other purposes). More information on using this folder can be found in the [[: | ||
| + | |||
| + | === plugins folder === | ||
| + | With Indigo 2022.2, web server plugins are no longer supported. | ||
| + | |||
| + | === public folder === | ||
| + | This directory can be used to publish files from the Indigo Web Server that will be made available to anyone __**without any authentication**__. If someone knows the URL of your reflector, they will have access to any files that are in this | ||
| + | directory, so use it wisely. | ||
| + | |||
| + | For example: | ||
| + | < | ||
| + | https:// | ||
| + | http:// | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | Basic MIME types will be determined from file extensions. Subdirectories are also allowed so you can create hierarchy: | ||
| + | < | ||
| + | https:// | ||
| + | https:// | ||
| + | </ | ||
| + | |||
| + | Any files and/or directories in the /public/ folder will need to be moved over when you upgrade to a new major version (the installer WILL NOT move them automatically). The public folder was added with Indigo version 7.1. | ||
| + | |||
| + | === static folder === | ||
| + | This directory can be used to publish files from the Indigo Web Server that will be made available to anyone __**with authentication**__. If someone knows the URL of your reflector, they will have access to any files that are in this directory once they have entered the appropriate authentication credentials for your reflector. | ||
| + | |||
| + | For example: | ||
| + | < | ||
| + | https:// | ||
| + | http:// | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | Basic MIME types will be determined from file extensions. Subdirectories are also allowed so you can create hierarchy: | ||
| + | < | ||
| + | https:// | ||
| + | https:// | ||
| + | </ | ||
| + | |||
| + | === Authentication === | ||
| + | == API Keys == | ||
| + | Information on Indigo Authentication options using API Keys can be found on the [[: | ||
| + | |||
| + | |||
| + | == Local Secrets == | ||
| + | In addition to authentication via API Keys and the Indigo Reflector (recommended), | ||
| + | |||
| + | //''/ | ||
| + | |||
| + | Those secrets can be used in both authorization headers and in the api-key query argument on URLs (exactly the same as API Keys). Example: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | Additionally, | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | The effect here is that only the first two will successfully authenticate API calls and nothing else. If the user only specifies this: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | " | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | The effect would be the same as unchecking the " | ||
| + | |||
| + | You use the local secret(s) the same way you would use an API Key; for example, | ||
| + | |||
| + | //'' | ||
| + | |||
| + | <color red> | ||
| + | === Custom Web Page Example === | ||
| + | Using the Indigo Web Server and Web Assets folders is extremely easy. This example is for reference purposes and is not meant to be a primer on constructing Web content. There are many good tutorials online that you can refer to if needed. | ||
| + | |||
| + | First, create your content. For example, web sites often contain a '' | ||
| + | < | ||
| + | < | ||
| + | <html lang=" | ||
| + | < | ||
| + | <meta charset=" | ||
| + | < | ||
| + | </ | ||
| + | <body style=" | ||
| + | <div id=" | ||
| + | Hello world. | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | Using a plain text editor, save this code as '' | ||
| + | |||
| + | That's it! The Indigo Web Server will serve your web page via the appropriate method. | ||