mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-11-04 09:25:15 +00:00 
			
		
		
		
	Compare commits
	
		
			24 Commits
		
	
	
		
			v2.12.0
			...
			04079e7c10
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					04079e7c10 | ||
| 
						 | 
					25a26d6175 | ||
| 
						 | 
					17246e418f | ||
| 
						 | 
					f7d3ca0b07 | ||
| 
						 | 
					a55de386e7 | ||
| 
						 | 
					e9d4f5b827 | ||
| 
						 | 
					1c1cee3836 | ||
| 
						 | 
					eaf6335694 | ||
| 
						 | 
					ffe05ebd41 | ||
| 
						 | 
					2e9a4f1aed | ||
| 
						 | 
					d17c85e4c8 | ||
| 
						 | 
					dad8d0ca00 | ||
| 
						 | 
					d7e0558a35 | ||
| 
						 | 
					ee41bb5562 | ||
| 
						 | 
					0cf6b9caa4 | ||
| 
						 | 
					68a9baf206 | ||
| 
						 | 
					d92421d098 | ||
| 
						 | 
					96c58b203e | ||
| 
						 | 
					d499e2bfef | ||
| 
						 | 
					2f9e062718 | ||
| 
						 | 
					edbed1af90 | ||
| 
						 | 
					8497022e41 | ||
| 
						 | 
					fa2c814fcb | ||
| 
						 | 
					d96a3987c0 | 
							
								
								
									
										10
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@@ -43,7 +43,7 @@ pipeline {
 | 
				
			|||||||
					steps {
 | 
										steps {
 | 
				
			||||||
						script {
 | 
											script {
 | 
				
			||||||
							// Defaults to the Branch name, which is applies to all branches AND pr's
 | 
												// Defaults to the Branch name, which is applies to all branches AND pr's
 | 
				
			||||||
							buildxPushTags = "-t docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}"
 | 
												buildxPushTags = "-t docker.io/nginxproxymanager/${IMAGE}-dev:${BRANCH_LOWER}"
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
@@ -203,7 +203,13 @@ pipeline {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
					steps {
 | 
										steps {
 | 
				
			||||||
						script {
 | 
											script {
 | 
				
			||||||
							npmGithubPrComment("Docker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/jc21/${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.", true)
 | 
												npmGithubPrComment("""Docker Image for build ${BUILD_NUMBER} is available on
 | 
				
			||||||
 | 
					[DockerHub](https://cloud.docker.com/repository/docker/nginxproxymanager/${IMAGE}-dev)
 | 
				
			||||||
 | 
					as `nginxproxymanager/${IMAGE}-dev:${BRANCH_LOWER}`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Note:** ensure you backup your NPM instance before testing this image! Especially if there are database changes
 | 
				
			||||||
 | 
					**Note:** this is a different docker image namespace than the official image
 | 
				
			||||||
 | 
					""", true)
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<p align="center">
 | 
					<p align="center">
 | 
				
			||||||
	<img src="https://nginxproxymanager.com/github.png">
 | 
						<img src="https://nginxproxymanager.com/github.png">
 | 
				
			||||||
	<br><br>
 | 
						<br><br>
 | 
				
			||||||
	<img src="https://img.shields.io/badge/version-2.12.0-green.svg?style=for-the-badge">
 | 
						<img src="https://img.shields.io/badge/version-2.12.1-green.svg?style=for-the-badge">
 | 
				
			||||||
	<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
 | 
						<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
 | 
				
			||||||
		<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
 | 
							<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
 | 
				
			||||||
	</a>
 | 
						</a>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -181,7 +181,9 @@ const internalNginx = {
 | 
				
			|||||||
	 * @param   {Object}  host
 | 
						 * @param   {Object}  host
 | 
				
			||||||
	 * @returns {Promise}
 | 
						 * @returns {Promise}
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	generateConfig: (host_type, host) => {
 | 
						generateConfig: (host_type, host_row) => {
 | 
				
			||||||
 | 
							// Prevent modifying the original object:
 | 
				
			||||||
 | 
							let host             = JSON.parse(JSON.stringify(host_row));
 | 
				
			||||||
		const nice_host_type = internalNginx.getFileFriendlyHostType(host_type);
 | 
							const nice_host_type = internalNginx.getFileFriendlyHostType(host_type);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (config.debug()) {
 | 
							if (config.debug()) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,9 +23,7 @@
 | 
				
			|||||||
		"locations",
 | 
							"locations",
 | 
				
			||||||
		"hsts_enabled",
 | 
							"hsts_enabled",
 | 
				
			||||||
		"hsts_subdomains",
 | 
							"hsts_subdomains",
 | 
				
			||||||
		"certificate",
 | 
							"certificate"
 | 
				
			||||||
		"use_default_location",
 | 
					 | 
				
			||||||
		"ipv6"
 | 
					 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
	"additionalProperties": false,
 | 
						"additionalProperties": false,
 | 
				
			||||||
	"properties": {
 | 
						"properties": {
 | 
				
			||||||
@@ -151,12 +149,6 @@
 | 
				
			|||||||
					"$ref": "./access-list-object.json"
 | 
										"$ref": "./access-list-object.json"
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		"use_default_location": {
 | 
					 | 
				
			||||||
			"type": "boolean"
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		"ipv6": {
 | 
					 | 
				
			||||||
			"type": "boolean"
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,7 @@
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		"forward_scheme": {
 | 
							"forward_scheme": {
 | 
				
			||||||
			"type": "string",
 | 
								"type": "string",
 | 
				
			||||||
			"enum": ["http", "https"]
 | 
								"enum": ["auto", "http", "https"]
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		"forward_domain_name": {
 | 
							"forward_domain_name": {
 | 
				
			||||||
			"description": "Domain Name",
 | 
								"description": "Domain Name",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,7 @@
 | 
				
			|||||||
		"value": {
 | 
							"value": {
 | 
				
			||||||
			"description": "Value in almost any form",
 | 
								"description": "Value in almost any form",
 | 
				
			||||||
			"example": "congratulations",
 | 
								"example": "congratulations",
 | 
				
			||||||
			"oneOf": [
 | 
								"anyOf": [
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					"type": "string",
 | 
										"type": "string",
 | 
				
			||||||
					"minLength": 1
 | 
										"minLength": 1
 | 
				
			||||||
@@ -46,7 +46,10 @@
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		"meta": {
 | 
							"meta": {
 | 
				
			||||||
			"description": "Extra metadata",
 | 
								"description": "Extra metadata",
 | 
				
			||||||
			"example": {},
 | 
								"example": {
 | 
				
			||||||
 | 
									"redirect": "http://example.com",
 | 
				
			||||||
 | 
									"html": "<h1>404</h1>"
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
			"type": "object"
 | 
								"type": "object"
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,8 +49,7 @@
 | 
				
			|||||||
										"minLength": 1
 | 
															"minLength": 1
 | 
				
			||||||
									},
 | 
														},
 | 
				
			||||||
									"password": {
 | 
														"password": {
 | 
				
			||||||
										"type": "string",
 | 
															"type": "string"
 | 
				
			||||||
										"minLength": 1
 | 
					 | 
				
			||||||
									}
 | 
														}
 | 
				
			||||||
								}
 | 
													}
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,9 +94,7 @@
 | 
				
			|||||||
									"avatar": "",
 | 
														"avatar": "",
 | 
				
			||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													},
 | 
				
			||||||
								"certificate": null,
 | 
													"certificate": null
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,9 +79,7 @@
 | 
				
			|||||||
									"nickname": "Admin",
 | 
														"nickname": "Admin",
 | 
				
			||||||
									"avatar": "",
 | 
														"avatar": "",
 | 
				
			||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													}
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -129,9 +129,7 @@
 | 
				
			|||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													},
 | 
				
			||||||
								"certificate": null,
 | 
													"certificate": null,
 | 
				
			||||||
								"access_list": null,
 | 
													"access_list": null
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,9 +114,7 @@
 | 
				
			|||||||
									"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
 | 
														"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
 | 
				
			||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													},
 | 
				
			||||||
								"access_list": null,
 | 
													"access_list": null
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -114,9 +114,7 @@
 | 
				
			|||||||
									"avatar": "",
 | 
														"avatar": "",
 | 
				
			||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													},
 | 
				
			||||||
								"certificate": null,
 | 
													"certificate": null
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,9 +99,7 @@
 | 
				
			|||||||
									"nickname": "Admin",
 | 
														"nickname": "Admin",
 | 
				
			||||||
									"avatar": "",
 | 
														"avatar": "",
 | 
				
			||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													}
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -129,9 +129,7 @@
 | 
				
			|||||||
									"roles": ["admin"]
 | 
														"roles": ["admin"]
 | 
				
			||||||
								},
 | 
													},
 | 
				
			||||||
								"certificate": null,
 | 
													"certificate": null,
 | 
				
			||||||
								"access_list": null,
 | 
													"access_list": null
 | 
				
			||||||
								"use_default_location": true,
 | 
					 | 
				
			||||||
								"ipv6": true
 | 
					 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,8 @@
 | 
				
			|||||||
			"name": "settingID",
 | 
								"name": "settingID",
 | 
				
			||||||
			"schema": {
 | 
								"schema": {
 | 
				
			||||||
				"type": "string",
 | 
									"type": "string",
 | 
				
			||||||
				"minLength": 1
 | 
									"minLength": 1,
 | 
				
			||||||
 | 
									"enum": ["default-site"]
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			"required": true,
 | 
								"required": true,
 | 
				
			||||||
			"description": "Setting ID",
 | 
								"description": "Setting ID",
 | 
				
			||||||
@@ -31,10 +32,21 @@
 | 
				
			|||||||
					"minProperties": 1,
 | 
										"minProperties": 1,
 | 
				
			||||||
					"properties": {
 | 
										"properties": {
 | 
				
			||||||
						"value": {
 | 
											"value": {
 | 
				
			||||||
							"$ref": "../../../components/setting-object.json#/properties/value"
 | 
												"type": "string",
 | 
				
			||||||
 | 
												"minLength": 1,
 | 
				
			||||||
 | 
												"enum": ["congratulations", "404", "444", "redirect", "html"]
 | 
				
			||||||
						},
 | 
											},
 | 
				
			||||||
						"meta": {
 | 
											"meta": {
 | 
				
			||||||
							"$ref": "../../../components/setting-object.json#/properties/meta"
 | 
												"type": "object",
 | 
				
			||||||
 | 
												"additionalProperties": false,
 | 
				
			||||||
 | 
												"properties": {
 | 
				
			||||||
 | 
													"redirect": {
 | 
				
			||||||
 | 
														"type": "string"
 | 
				
			||||||
 | 
													},
 | 
				
			||||||
 | 
													"html": {
 | 
				
			||||||
 | 
														"type": "string"
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
    auth_basic            "Authorization required";
 | 
					    auth_basic            "Authorization required";
 | 
				
			||||||
    auth_basic_user_file  /data/access/{{ access_list_id }};
 | 
					    auth_basic_user_file  /data/access/{{ access_list_id }};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% if access_list.pass_auth == 0 %}
 | 
					    {% if access_list.pass_auth == 0 or access_list.pass_auth == true %}
 | 
				
			||||||
    proxy_set_header Authorization "";
 | 
					    proxy_set_header Authorization "";
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -17,7 +17,7 @@
 | 
				
			|||||||
    deny all;
 | 
					    deny all;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Access checks must...
 | 
					    # Access checks must...
 | 
				
			||||||
    {% if access_list.satisfy_any == 1 %}
 | 
					    {% if access_list.satisfy_any == 1 or access_list.satisfy_any == true %}
 | 
				
			||||||
    satisfy any;
 | 
					    satisfy any;
 | 
				
			||||||
    {% else %}
 | 
					    {% else %}
 | 
				
			||||||
    satisfy all;
 | 
					    satisfy all;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,11 +5,16 @@
 | 
				
			|||||||
  #listen [::]:80;
 | 
					  #listen [::]:80;
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% if certificate -%}
 | 
					{% if certificate -%}
 | 
				
			||||||
  listen 443 ssl{% if http2_support == 1 or http2_support == true %} http2{% endif %};
 | 
					  listen 443 ssl;
 | 
				
			||||||
{% if ipv6 -%}
 | 
					{% if ipv6 -%}
 | 
				
			||||||
  listen [::]:443 ssl{% if http2_support == 1 or http2_support == true %} http2{% endif %};
 | 
					  listen [::]:443 ssl;
 | 
				
			||||||
{% else -%}
 | 
					{% else -%}
 | 
				
			||||||
  #listen [::]:443;
 | 
					  #listen [::]:443;
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
  server_name {{ domain_names | join: " " }};
 | 
					  server_name {{ domain_names | join: " " }};
 | 
				
			||||||
 | 
					{% if http2_support == 1 or http2_support == true %}
 | 
				
			||||||
 | 
					  http2 on;
 | 
				
			||||||
 | 
					{% else -%}
 | 
				
			||||||
 | 
					  http2 off;
 | 
				
			||||||
 | 
					{% endif %}
 | 
				
			||||||
@@ -7,11 +7,7 @@
 | 
				
			|||||||
    proxy_set_header X-Forwarded-For    $remote_addr;
 | 
					    proxy_set_header X-Forwarded-For    $remote_addr;
 | 
				
			||||||
    proxy_set_header X-Real-IP		$remote_addr;
 | 
					    proxy_set_header X-Real-IP		$remote_addr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    set $proxy_forward_scheme {{ forward_scheme }};
 | 
					    proxy_pass       {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
 | 
				
			||||||
    set $proxy_server         "{{ forward_host }}";
 | 
					 | 
				
			||||||
    set $proxy_port           {{ forward_port }};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    proxy_pass       $proxy_forward_scheme://$proxy_server:$proxy_port{{ forward_path }};
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% include "_access.conf" %}
 | 
					    {% include "_access.conf" %}
 | 
				
			||||||
    {% include "_assets.conf" %}
 | 
					    {% include "_assets.conf" %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -137,5 +137,13 @@ Email:    admin@example.com
 | 
				
			|||||||
Password: changeme
 | 
					Password: changeme
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Immediately after logging in with this default user you will be asked to modify your details and change your password.
 | 
					Immediately after logging in with this default user you will be asked to modify your details and change your password. You can change defaults with:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      INITIAL_ADMIN_EMAIL: my@example.com
 | 
				
			||||||
 | 
					      INITIAL_ADMIN_PASSWORD: mypassword1
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<td class="text-center">
 | 
					<td class="text-center">
 | 
				
			||||||
    <div class="avatar d-block" style="background-image: url(<%- owner.avatar || '/images/default-avatar.jpg' %>)" title="Owned by <%- owner.name %>">
 | 
					    <div class="avatar d-block" style="background-image: url(<%- (owner && owner.avatar) || '/images/default-avatar.jpg' %>)" title="Owned by <%- (owner && owner.name) || 'a deleted user' %>">
 | 
				
			||||||
        <span class="avatar-status <%- owner.is_disabled ? 'bg-red' : 'bg-green' %>"></span>
 | 
					        <span class="avatar-status <%- owner && !owner.is_disabled ? 'bg-green' : 'bg-red' %>"></span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
<td>
 | 
					<td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
		"credentials": "dns_acmedns_api_url = http://acmedns-server/\ndns_acmedns_registration_file = /data/acme-registration.json",
 | 
							"credentials": "dns_acmedns_api_url = http://acmedns-server/\ndns_acmedns_registration_file = /data/acme-registration.json",
 | 
				
			||||||
		"full_plugin_name": "dns-acmedns"
 | 
							"full_plugin_name": "dns-acmedns"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
    "active24":{
 | 
						"active24":{
 | 
				
			||||||
		"name": "Active24",
 | 
							"name": "Active24",
 | 
				
			||||||
		"package_name": "certbot-dns-active24",
 | 
							"package_name": "certbot-dns-active24",
 | 
				
			||||||
		"version": "~=1.5.1",
 | 
							"version": "~=1.5.1",
 | 
				
			||||||
@@ -303,6 +303,14 @@
 | 
				
			|||||||
		"credentials": "dns_joker_username = <Dynamic DNS Authentication Username>\ndns_joker_password = <Dynamic DNS Authentication Password>\ndns_joker_domain = <Dynamic DNS Domain>",
 | 
							"credentials": "dns_joker_username = <Dynamic DNS Authentication Username>\ndns_joker_password = <Dynamic DNS Authentication Password>\ndns_joker_domain = <Dynamic DNS Domain>",
 | 
				
			||||||
		"full_plugin_name": "dns-joker"
 | 
							"full_plugin_name": "dns-joker"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						"leaseweb": {
 | 
				
			||||||
 | 
							"name": "LeaseWeb",
 | 
				
			||||||
 | 
							"package_name": "certbot-dns-leaseweb",
 | 
				
			||||||
 | 
							"version": "~=1.0.1",
 | 
				
			||||||
 | 
							"dependencies": "",
 | 
				
			||||||
 | 
							"credentials": "dns_leaseweb_api_token = 01234556789",
 | 
				
			||||||
 | 
							"full_plugin_name": "dns-leaseweb"
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	"linode": {
 | 
						"linode": {
 | 
				
			||||||
		"name": "Linode",
 | 
							"name": "Linode",
 | 
				
			||||||
		"package_name": "certbot-dns-linode",
 | 
							"package_name": "certbot-dns-linode",
 | 
				
			||||||
@@ -424,13 +432,13 @@
 | 
				
			|||||||
		"full_plugin_name": "dns-rfc2136"
 | 
							"full_plugin_name": "dns-rfc2136"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"rockenstein": {
 | 
						"rockenstein": {
 | 
				
			||||||
                "name": "rockenstein AG",
 | 
							"name": "rockenstein AG",
 | 
				
			||||||
                "package_name": "certbot-dns-rockenstein",
 | 
							"package_name": "certbot-dns-rockenstein",
 | 
				
			||||||
                "version": "~=1.0.0",
 | 
							"version": "~=1.0.0",
 | 
				
			||||||
                "dependencies": "",
 | 
							"dependencies": "",
 | 
				
			||||||
                "credentials": "dns_rockenstein_token=<token>",
 | 
							"credentials": "dns_rockenstein_token=<token>",
 | 
				
			||||||
                "full_plugin_name": "dns-rockenstein"
 | 
							"full_plugin_name": "dns-rockenstein"
 | 
				
			||||||
        },
 | 
						},
 | 
				
			||||||
	"route53": {
 | 
						"route53": {
 | 
				
			||||||
		"name": "Route 53 (Amazon)",
 | 
							"name": "Route 53 (Amazon)",
 | 
				
			||||||
		"package_name": "certbot-dns-route53",
 | 
							"package_name": "certbot-dns-route53",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@ describe('Full Certificate Provisions', () => {
 | 
				
			|||||||
		});
 | 
							});
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	it.only('Should be able to create new http certificate', function() {
 | 
						it('Should be able to create new http certificate', function() {
 | 
				
			||||||
		cy.task('backendApiPost', {
 | 
							cy.task('backendApiPost', {
 | 
				
			||||||
			token: token,
 | 
								token: token,
 | 
				
			||||||
			path:  '/api/nginx/certificates',
 | 
								path:  '/api/nginx/certificates',
 | 
				
			||||||
@@ -35,7 +35,7 @@ describe('Full Certificate Provisions', () => {
 | 
				
			|||||||
	it('Should be able to create new DNS certificate with Powerdns', function() {
 | 
						it('Should be able to create new DNS certificate with Powerdns', function() {
 | 
				
			||||||
		cy.task('backendApiPost', {
 | 
							cy.task('backendApiPost', {
 | 
				
			||||||
			token: token,
 | 
								token: token,
 | 
				
			||||||
			path:  '/api/certificates',
 | 
								path:  '/api/nginx/certificates',
 | 
				
			||||||
			data:  {
 | 
								data:  {
 | 
				
			||||||
				domain_names: [
 | 
									domain_names: [
 | 
				
			||||||
					'website2.example.com'
 | 
										'website2.example.com'
 | 
				
			||||||
@@ -45,7 +45,8 @@ describe('Full Certificate Provisions', () => {
 | 
				
			|||||||
					dns_challenge: true,
 | 
										dns_challenge: true,
 | 
				
			||||||
					dns_provider: 'powerdns',
 | 
										dns_provider: 'powerdns',
 | 
				
			||||||
					dns_provider_credentials: 'dns_powerdns_api_url = http://ns1.pdns:8081\r\ndns_powerdns_api_key = npm',
 | 
										dns_provider_credentials: 'dns_powerdns_api_url = http://ns1.pdns:8081\r\ndns_powerdns_api_key = npm',
 | 
				
			||||||
					letsencrypt_agree: true
 | 
										letsencrypt_agree: true,
 | 
				
			||||||
 | 
										propagation_seconds: 5,
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				provider: 'letsencrypt'
 | 
									provider: 'letsencrypt'
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
/// <reference types="cypress" />
 | 
					/// <reference types="cypress" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('Hosts endpoints', () => {
 | 
					describe('Proxy Hosts endpoints', () => {
 | 
				
			||||||
	let token;
 | 
						let token;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	before(() => {
 | 
						before(() => {
 | 
				
			||||||
							
								
								
									
										124
									
								
								test/cypress/e2e/api/Settings.cy.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								test/cypress/e2e/api/Settings.cy.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,124 @@
 | 
				
			|||||||
 | 
					/// <reference types="cypress" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					describe('Settings endpoints', () => {
 | 
				
			||||||
 | 
						let token;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						before(() => {
 | 
				
			||||||
 | 
							cy.getToken().then((tok) => {
 | 
				
			||||||
 | 
								token = tok;
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Get all settings', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiGet', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings',
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('get', 200, '/settings', data);
 | 
				
			||||||
 | 
								expect(data.length).to.be.greaterThan(0);
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Get default-site setting', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiGet', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('get', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Default Site congratulations', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiPut', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
								data: {
 | 
				
			||||||
 | 
									value: 'congratulations',
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('put', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
								expect(data).to.have.property('value');
 | 
				
			||||||
 | 
								expect(data.value).to.be.equal('congratulations');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Default Site 404', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiPut', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
								data: {
 | 
				
			||||||
 | 
									value: '404',
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('put', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
								expect(data).to.have.property('value');
 | 
				
			||||||
 | 
								expect(data.value).to.be.equal('404');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Default Site 444', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiPut', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
								data: {
 | 
				
			||||||
 | 
									value: '444',
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('put', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
								expect(data).to.have.property('value');
 | 
				
			||||||
 | 
								expect(data.value).to.be.equal('444');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Default Site redirect', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiPut', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
								data: {
 | 
				
			||||||
 | 
									value: 'redirect',
 | 
				
			||||||
 | 
									meta: {
 | 
				
			||||||
 | 
										redirect: 'https://www.google.com',
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('put', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
								expect(data).to.have.property('value');
 | 
				
			||||||
 | 
								expect(data.value).to.be.equal('redirect');
 | 
				
			||||||
 | 
								expect(data).to.have.property('meta');
 | 
				
			||||||
 | 
								expect(data.meta).to.have.property('redirect');
 | 
				
			||||||
 | 
								expect(data.meta.redirect).to.be.equal('https://www.google.com');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						it('Default Site html', function() {
 | 
				
			||||||
 | 
							cy.task('backendApiPut', {
 | 
				
			||||||
 | 
								token: token,
 | 
				
			||||||
 | 
								path:  '/api/settings/default-site',
 | 
				
			||||||
 | 
								data: {
 | 
				
			||||||
 | 
									value: 'html',
 | 
				
			||||||
 | 
									meta: {
 | 
				
			||||||
 | 
										html: '<p>hello world</p>'
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							}).then((data) => {
 | 
				
			||||||
 | 
								cy.validateSwaggerSchema('put', 200, '/settings/{settingID}', data);
 | 
				
			||||||
 | 
								expect(data).to.have.property('id');
 | 
				
			||||||
 | 
								expect(data.id).to.be.equal('default-site');
 | 
				
			||||||
 | 
								expect(data).to.have.property('value');
 | 
				
			||||||
 | 
								expect(data.value).to.be.equal('html');
 | 
				
			||||||
 | 
								expect(data).to.have.property('meta');
 | 
				
			||||||
 | 
								expect(data.meta).to.have.property('html');
 | 
				
			||||||
 | 
								expect(data.meta.html).to.be.equal('<p>hello world</p>');
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
@@ -7,7 +7,7 @@ const BackendApi = function(config, token) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	this.axios = axios.create({
 | 
						this.axios = axios.create({
 | 
				
			||||||
		baseURL: config.baseUrl,
 | 
							baseURL: config.baseUrl,
 | 
				
			||||||
		timeout: 60000,
 | 
							timeout: 90000,
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user