Skip to content

Instantly share code, notes, and snippets.

@fracsi
fracsi / !dsn_handler_for_swiftmailer.php
Last active December 21, 2020 21:11
DSN Feature for SwiftMailer
<?php
$mailer = Swift_Mailer::newInstance(
Swift_SmtpTransport::newInstance('smtp.example.org', 25)
);
// NOTIFY=NEVER
$mailer->registerPlugin(new DsnPlugin([new NotifyHandler('never')]));
// --- OR ---
@ramr
ramr / haproxy-config-host-remove-port-rule
Created April 25, 2016 21:50
haproxy-config-host-remove-port-rule
[ramr@localhost origin (cached:master:c-0:s-0+224:o-6126)]$ git stash show stash@{3} -p
diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template
index eb5b565..0f4e999 100644
--- a/images/router/haproxy/conf/haproxy-config.template
+++ b/images/router/haproxy/conf/haproxy-config.template
@@ -60,6 +60,7 @@ listen stats :1936
frontend public
bind :{{env "ROUTER_SERVICE_HTTP_PORT" "80"}}
mode http
+ http-request replace-value Host (.*):.* \1