Keycloak Docker HTTPS required

Update Feb 2022: Keycloak 17+ (e.g. quay.io/keycloak/keycloak:17.0.0) doesn’t support autogeneration of selfsigned cert. Minimal HTTPS working example for Keycloak 17+: 1.) Generate selfsigned domain cert/key (follow instructions on your terminal): openssl req -newkey rsa:2048 -nodes \ -keyout server.key.pem -x509 -days 3650 -out server.crt.pem 2.) Update permissions for the key chmod 755 server.key.pem 3.) Start Keycloak … Read more

How do I use https (SSL) in XAMPP while using virtual hosts

SSL, of the HTTPS://url.here/ variety, is entirely handled by Apache and has nothing to do with PHP, or any of PHP’s extensions/modules, or any php.ini settings. A typical SSL Enabled VirtualHost looks like this and contains at least these parts… <VirtualHost *:443> DocumentRoot “C:/WampDeveloper/Websites/www.example.com/webroot” ServerName www.example.com ServerAlias example.com SSLEngine On SSLCertificateFile “C:/WampDeveloper/Websites/www.example.com/certs/public.crt” SSLCertificateKeyFile “C:/WampDeveloper/Websites/www.example.com/certs/private.key” <Directory … Read more

Easy HTTP requests with gzip/deflate compression

For anyone coming across this in recent times, the request library supports gzip decompression out of the box now. Use as follows: request( { method: ‘GET’ , uri: ‘http://www.google.com’ , gzip: true } , function (error, response, body) { // body is the decompressed response body console.log(‘server encoded the data as: ‘ + (response.headers[‘content-encoding’] || … Read more

Vite https on localhost

Easiest way is to use the vite-plugin-mkcert package. npm i vite-plugin-mkcert -D vite.config.js import { defineConfig } from ‘vite’ import mkcert from ‘vite-plugin-mkcert’ export default defineConfig({ server: { https: true }, plugins: [ mkcert() ] }) When you run the local vite dev server you may be prompted for your password the first time. It … Read more

git clone with HTTPS or SSH remote?

GitHub have changed their recommendation several times (example). It appears that they currently recommend HTTPS because it is the easiest to set up on the widest range of networks and platforms, and by users who are new to all this. There is no inherent flaw in SSH (if there was they would disable it) — … Read more

What’s the de facto standard for a Reverse Proxy to tell the backend SSL is used?

The proxy can add extra (or overwrite) headers to requests it receives and passes through to the back-end. These can be used to communicate information to the back-end. So far I’ve seen a couple used for forcing the use of https in URL scheme: X-Forwarded-Protocol: https X-Forwarded-Ssl: on X-Url-Scheme: https And wikipedia also mentions: # … Read more

How to configure a proxy server for both HTTP and HTTPS in Maven’s settings.xml?

Maven proxy from settings.xml is used for both http and https, so you just need to define one proxy server and it will be used for both, you just need to leave only one proxy tag, like this: <proxies> <proxy> <id>myhttpproxy</id> <active>true</active> <protocol>http</protocol> <host>192.168.1.2</host> <port>3128</port> <nonProxyHosts>localhost</nonProxyHosts> </proxy> </proxies> The protocol above is the protocol of … Read more

https with WCF error: “Could not find base address that matches scheme https”

I had this exact same problem. Except my solution was to add an “s” to the binding value. Old: binding=”mexHttpBinding” New: binding=”mexHttpsBinding” web.config snippet: <services> <service behaviorConfiguration=”ServiceBehavior” name=”LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService”> <endpoint behaviorConfiguration=”AspNetAjaxBehavior” binding=”webHttpBinding” bindingConfiguration=”webBinding” contract=”LIMS.UI.Web.WCFServices.Accessioning.QuickDataEntryService” /> <endpoint address=”mex” binding=”mexHttpsBinding” contract=”IMetadataExchange” /> </service>