mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-07 21:20:07 +01:00
✅ Correctly detect secured proxies
This commit is contained in:
@@ -45,6 +45,10 @@ class AddSiteVC: NSViewController, NSTextFieldDelegate {
|
||||
|
||||
// MARK: - Outlet Interactions
|
||||
|
||||
@IBAction func pressedCreateProxy(_ sender: Any) {
|
||||
// valet proxy (domain) http://127.0.0.1:90 (--secure)
|
||||
}
|
||||
|
||||
@IBAction func pressedCreateLink(_ sender: Any) {
|
||||
let path = self.pathControl.url!.path
|
||||
let name = self.linkName.stringValue
|
||||
|
||||
@@ -22,7 +22,7 @@ class DomainListTLSCell: NSTableCellView, DomainListCellProtocol
|
||||
}
|
||||
|
||||
func populateCell(with proxy: ValetProxy) {
|
||||
imageViewLock.contentTintColor = proxy.target.contains("https")
|
||||
imageViewLock.contentTintColor = proxy.secured
|
||||
? NSColor(named: "IconColorGreen")
|
||||
: NSColor(named: "IconColorRed")
|
||||
}
|
||||
|
||||
@@ -13,11 +13,13 @@ class ValetProxy: DomainListable
|
||||
var domain: String
|
||||
var tld: String
|
||||
var target: String
|
||||
var secured: Bool = false
|
||||
|
||||
init(_ configuration: NginxConfiguration) {
|
||||
self.domain = configuration.domain
|
||||
self.tld = configuration.tld
|
||||
self.target = configuration.proxy!
|
||||
self.secured = Filesystem.fileExists("~/.config/valet/Certificates/\(self.domain).\(self.tld).key")
|
||||
}
|
||||
|
||||
// MARK: - DomainListable Protocol
|
||||
@@ -27,7 +29,7 @@ class ValetProxy: DomainListable
|
||||
}
|
||||
|
||||
func getListableSecured() -> Bool {
|
||||
return false
|
||||
return self.secured
|
||||
}
|
||||
|
||||
func getListableAbsolutePath() -> String {
|
||||
|
||||
Reference in New Issue
Block a user