From: Kai Moritz Date: Fri, 20 Feb 2026 12:25:15 +0000 (+0100) Subject: In-Page-Links über Anchor's repariert X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=1f83f330200c47c117c7ff616547f963bea1cd63;p=website In-Page-Links über Anchor's repariert --- diff --git a/content/blog/archive/2015/bypassing-the-same-origin-policiy-for-loal-files-during-development.md b/content/blog/archive/2015/bypassing-the-same-origin-policiy-for-loal-files-during-development.md index b6a8beaa..72a5027b 100644 --- a/content/blog/archive/2015/bypassing-the-same-origin-policiy-for-loal-files-during-development.md +++ b/content/blog/archive/2015/bypassing-the-same-origin-policiy-for-loal-files-during-development.md @@ -46,6 +46,7 @@ _They only have access to files, that reside in the same directory or in a direc You can read more about that rule on [MDN](https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file%3A_URIs "Same-origin policy for file: URIs"). + I often violate that rule, when developing templates for dynamically rendered pages with [Thymeleaf](http://www.thymeleaf.org/ "Read more about the XML/XHTML/HTML5 template engine Thymeleaf"), or similar techniques. That is, because I like to place the template-files on a subdirectory of the directory, that contains my webapp ( `src/main/webapp` with Maven): @@ -88,7 +89,7 @@ Firefox: Chrome: Restart Chrome with `--disable-web-security` or `--allow-file-access-from-files` (for more, see this [question on Stackoverflow)](http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome "Read more on how to turn of the Same-origin policy in chrome"). -## Quick Fix For Firefox +## Quick Fix For Firefox If you develop with Firefox, there is a quick fix, to bypass the Same-origin policy for local files. diff --git a/content/blog/archive/2018/configure-https-for-jetty-maven-plugin-9-0-x.md b/content/blog/archive/2018/configure-https-for-jetty-maven-plugin-9-0-x.md index d895f8cf..186c6f68 100644 --- a/content/blog/archive/2018/configure-https-for-jetty-maven-plugin-9-0-x.md +++ b/content/blog/archive/2018/configure-https-for-jetty-maven-plugin-9-0-x.md @@ -31,6 +31,7 @@ Since the constructor signature changed for Connectors in jetty-9 to require the So, here is, what you have to do to fix this [broken example](http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#maven-config-https "Jump to the example in the documentation of the jetty-maven-plugin"): the content shown for the file `jetty.xml` in the example is wrong. It has to look like the other example-files. That is, ith has to start with a ``-tag. The corrected content of the file looks like this: + ```html @@ -60,6 +61,7 @@ So, here is, what you have to do to fix this [broken example](http://www.eclipse If you are getting the error `[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.0.5.v20130815:run (default-cli) on project FOOBAR: Failure: etc/jetty.keystore (file or directory not found) -> [Help 1]` now, this is because you have to create/get a certificate for your HTTPS-Connector. For development, a selfsigned certificate is sufficient. You can easily create one like back in the [good old `maven-jetty-plugin`-times](http://mrhaki.blogspot.de/2009/05/configure-maven-jetty-plugin-for-ssl.html "Example for configuring the HTTPS-Connector of the old maven-jetty-plugin"), with this command: + ```bash keytool -genkey \ -alias jetty \ @@ -72,6 +74,7 @@ keytool -genkey \ Just be sure, to change the example file `jetty-ssl.xml`, to reflect the path to your new keystore file and password. Your `jetty-ssl.xml` should look like: + ```html @@ -120,6 +123,7 @@ Just be sure, to change the example file `jetty-ssl.xml`, to reflect the path to Unless you are running `mvn jetty:run` as `root`, you should see another error now: `[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.0.5.v20130815:run (default-cli) on project FOOBAR: Failure: Permission denied -> [Help 1]`. This is, because the ports are set to the numbers `80` and `443` of the privileged port-range. + You have to change `jetty-http.xml` like this: ```html @@ -166,6 +170,7 @@ You have to change `jetty-http.xml` like this: ``` + ... and `jetty-https.xml` like this: ```html @@ -226,7 +231,7 @@ So, now it is working. But you still have to clutter your project with several f Because of that, I've created a simple 6-step quick-fix-guide to get the HTTPS-Connector of the `jetty-maven-plugin` running. -## Quick Fix +## Quick Fix 1. Download [jetty.xml](/wp-uploads/2014/02/jetty.xml) or copy it [from above](#jetty-xml) and place it in `src/test/resources/jetty.xml` 1. Download [jetty-http.xml](/wp-uploads/2014/02/jetty-http.xml) or copy it [from above](#jetty-http-xml) and place it in `src/test/resources/jetty-http.xml` diff --git a/content/blog/archive/2018/disable-automatic-p-and-br-tags-in-the-wordpress-editor-and-do-it-as-early-as-you-can.md b/content/blog/archive/2018/disable-automatic-p-and-br-tags-in-the-wordpress-editor-and-do-it-as-early-as-you-can.md index 9fb841c9..bb153a5a 100644 --- a/content/blog/archive/2018/disable-automatic-p-and-br-tags-in-the-wordpress-editor-and-do-it-as-early-as-you-can.md +++ b/content/blog/archive/2018/disable-automatic-p-and-br-tags-in-the-wordpress-editor-and-do-it-as-early-as-you-can.md @@ -22,7 +22,7 @@ Even when in text-mode, wordpress is adding some `

-` and `
`-tags automagi But what is even worse: after [really turning off wordpress's automagically-messup-functionality](#disable "Jump to the tech-section, if you only want to find out, how to disable wordpress's auto-messup functionality"), nearly all my handwritten `

`-tags were gone, too. So, if you want to turn of automatic `

-` and `
`-tags, you should really do it as early, as you can. Otherwise, you will have to clean up all your old posts afterwards like me. TI've lost some hours with usless HTML-editing today, because of that sh#%&\*! -## How to disable them +## How to disable them The [wordpress-documentation of the build-in HTML-editor](https://codex.wordpress.org/TinyMCE#Automatic_use_of_Paragraph_Tags) links to [this post](http://redrokk.com/2010/08/16/removing-p-tags-in-wordpress/), which describs how to disable autmatic use of paragraph tags. Simple open the file `wp-includes/default-filters.php` of you wordpress-installation and comment out the following line: diff --git a/content/blog/archive/2019/create-self-signed-multi-domain-san-certificates.md b/content/blog/archive/2019/create-self-signed-multi-domain-san-certificates.md index 7848ec3d..b7a75e74 100644 --- a/content/blog/archive/2019/create-self-signed-multi-domain-san-certificates.md +++ b/content/blog/archive/2019/create-self-signed-multi-domain-san-certificates.md @@ -209,7 +209,7 @@ To authenticate service A against client B you will have to: _If you want, that your clients also authentificate themselfs to your services, so that only clients with a trusted certificate can connect (2-Way-Authentication), client B also needs its own signed certificate to authenticate against service A and service A also needs access to the truststore, to be able to trust that certificate._ -## Simple Example-Scripts To Create A Private CA And Self-Signed Certificates With SAN-Extension +## Simple Example-Scripts To Create A Private CA And Self-Signed Certificates With SAN-Extension The following two scripts automate the presented steps and may be useful, when setting up a private CA for Java-development: diff --git a/content/blog/archive/2019/virtual-networking-with-linux-veth-pairs.md b/content/blog/archive/2019/virtual-networking-with-linux-veth-pairs.md index b2a33472..485fc8a3 100644 --- a/content/blog/archive/2019/virtual-networking-with-linux-veth-pairs.md +++ b/content/blog/archive/2019/virtual-networking-with-linux-veth-pairs.md @@ -22,7 +22,7 @@ To stick with the metaphor: using a veth-pair is like taking a patch-cable with - [Connect A Network Namespace To A Bridge](#netns2br) - [Connect Two Bridges](#br2br) -### Connect Two Network Namespaces +### Connect Two Network Namespaces In this usage scenario, two [network namespaces](/virtual-networking-with-linux-network-namespaces "Network Namespaces Explained") (i.e., two virtual hosts) are connected with a virtual patch cable (the veth-pair). One of the two network namespaces may be the default network namespace, but not both (see [Pitfall: Pointless Usage Of Veth-Pairs](#pointless "See Pitfall: Wrong (Or Better: Pointless) Usage Of Veth-Pairs")). @@ -120,7 +120,7 @@ Receipt: ``` -### Connect A Network Namespace To A Bridge +### Connect A Network Namespace To A Bridge In this usage scenario, a [network namespace](/virtual-networking-with-linux-network-namespaces "Network Namespaces Explained") (i.e., a virtual host) is connected to a [bridge](/virtual-networking-with-linux-virtual-bridges "Virtual Bridges Explained") (i.e. a virtual network/switch) with a virtual patch cable (the veth-pair). The network namespace may be the default network namespace (i.e., the local host). @@ -228,7 +228,7 @@ _The bridge only needs its own IP, if the network has to be routable (see: [Virt In general, it is advisable, to use the first approach, if you do need a connection to the local host, because it does not clutter your default network namespace with two more interfaces (here: `veth0` and `link_2`). -### Connect Two Bridges +### Connect Two Bridges Receipt: @@ -250,13 +250,13 @@ Receipt: - [Capturing Packages On Virtual Interfaces](#capturing) - [Wrong (Or Better: Pointless) Usage Of Veth-Pairs](#pointless) -### Do Not Forget To Specifiy The Prefix-Length For The Addressses +### Do Not Forget To Specifiy The Prefix-Length For The Addressses **If you forget to specifiy the prefix-length for one of the addresses, you will not be able to ping the host on the other end of the veth-pair.** `192.168.111.1/24` specifies the address `192.168.111.1` as part of the subnet with the network-mask `255.255.255.0`. If you forget the prefix, the address will be interpreted as `192.168.111.1/32` and the kernel will not add a network-route. Hence, you will not be able to ping the other end ( `192.168.111.2`), because the kernel would not know, that it is reachable via the interface that belongs to the address `192.168.111.1`. -### Capturing Packages On Virtual Interfaces +### Capturing Packages On Virtual Interfaces If you run `tcpdump` on an interface in the default-namespace, the captured packages show up immediatly. I.e.: You can watch the exchange of ICMP-packages live, as it happens. @@ -264,7 +264,7 @@ But: **If you run `tcpdump` in a named network-namespace, the captured packages _Do not ask me why — I just witnessed that odd behaviour on my linux-box and found it noteworthy, because I thought, that my setup was not working several times, before I realised, that I had to kill `tcpdump` to see the captured packages._ -### Wrong (Or Better: Pointless) Usage Of Veth-Pairs +### Wrong (Or Better: Pointless) Usage Of Veth-Pairs This is another reason, why packages might not show up on the virtual interfaces of the configured veth-pair. Often, veth-pairs are used as a simple example for virtual networking like in the following snippet: diff --git a/content/blog/archive/2020/a-perfect-outline.md b/content/blog/archive/2020/a-perfect-outline.md index 3597abec..481b902b 100644 --- a/content/blog/archive/2020/a-perfect-outline.md +++ b/content/blog/archive/2020/a-perfect-outline.md @@ -205,7 +205,7 @@ That procedure finally gave me the clue, I want to share with you now. ## Step by Step (Uh Baby!) -### Step I: Investigate the Structured Part +### Step I: Investigate the Structured Part Let us start with the strictly structured part of the document: **the article and it's subsections**. At first a minimal example with no markup except the `article`\- and the `section`-tags: @@ -256,7 +256,7 @@ We can think of it as the title of our document. We can add headings of any kind ( `h1`- `h6`) here and will always get an identically structured outline, that reflects the text of our headings. If we want to give the body a title, we have to place a heading outside and before any sectioning-elements: -#### Example 05: Markup +#### Example 05: Markup ```html @@ -307,7 +307,7 @@ But there are more. For now, you only have to know, that in HTML5, sectioning elements define the structure of the outline. Also, you should memorize, that the outline always has a single root without any siblings: the `body`. -### Step II: Investigate the Page-Elements +### Step II: Investigate the Page-Elements So, let us do the same with the tags that represent the different logical sections of a web-page: **the page-elements**. We start with a minimal example again, that contains no markup except the `header`\- the `main` and the `footer`-tags: @@ -340,7 +340,7 @@ So, what happens, if we add the desired markup for our headings? We want a `h1`-heading for our main-content, because it is the important part of our page. The header should have a `h2`-heading and the footer a `h3`-heading, because it is rather unimportant. -#### Example 07: Markup +#### Example 07: Markup ```html @@ -605,6 +605,7 @@ The reason for this is, that `nav` and `aside` are sectioning elements: [View Example 13](/wp-uploads/2015/06/example-13.html) + The HTML5 spec defines four [sectioning elements](http://www.w3.org/WAI/GL/wiki/Using_HTML5_section_elements "Read about the intended use of these sectioning elements"): `article`, `section`, `nav` and `aside`! Some explain the confusion about this fact with the constantly evolving standard, that leads to [structurally unclear specifications](http://www.smashingmagazine.com/2013/01/18/the-importance-of-sections/#cad-middle "Jump to this rather lame excuse in an otherwise great article"). I will be frank: diff --git a/content/blog/archive/2020/actuator-httptrace-does-not-work-with-spring-boot-2-2.md b/content/blog/archive/2020/actuator-httptrace-does-not-work-with-spring-boot-2-2.md index 2ae5eaab..b66a0d2a 100644 --- a/content/blog/archive/2020/actuator-httptrace-does-not-work-with-spring-boot-2-2.md +++ b/content/blog/archive/2020/actuator-httptrace-does-not-work-with-spring-boot-2-2.md @@ -61,7 +61,7 @@ _But..._ **...it simply does not work at all!** -## The Fix +## The Fix The simple fix for this problem is, to add a `@Bean` of type `InMemoryHttpTraceRepository` to your **`@Configuration`**-class: @@ -74,7 +74,7 @@ public HttpTraceRepository htttpTraceRepository() ``` -## The Explanation +## The Explanation The cause of this problem is not a bug, but a legitimate change in the default configuration. Unfortunately, this change is not noted in the according section of the documentation. diff --git a/content/blog/archive/2020/how-to-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-hiding-the-app-behind-a-reverse-proxy-gateway.md b/content/blog/archive/2020/how-to-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-hiding-the-app-behind-a-reverse-proxy-gateway.md index 8fd78f19..ce14e4cf 100644 --- a/content/blog/archive/2020/how-to-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-hiding-the-app-behind-a-reverse-proxy-gateway.md +++ b/content/blog/archive/2020/how-to-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-hiding-the-app-behind-a-reverse-proxy-gateway.md @@ -50,7 +50,7 @@ To reach this goal we will have to: _By the way:_ Any other server, that can act as reverse proxy, or some real gateway,like [Zuul](https://github.com/Netflix/zuul "In real real-world you should consider something like Zuul of similar") would work as well, but we stick with good old NGINX, to keep it simple. -## Switching The Setup Of Your OAuth2-Provider To Production +## Switching The Setup Of Your OAuth2-Provider To Production In our example we are using GitHub as oauth2-provider and `example.com` as the domain, where the app should be found after the release. So, we will have to change the **Authorization callback URL** to @@ -65,7 +65,7 @@ But still, we really would like to test that production-setup to be sure that we _In order to tackle this chicken-egg-problem, we will fool our locally running browser to belive, that `example.com` is our local development system._ -## Setting Up The Alias for `example.com` +## Setting Up The Alias for `example.com` On Linux/Unix this can be simply done by editing **`/etc/hosts`**. You just have to add the domain ( `example.com`) at the end of the line that starts with `127.0.0.1`: @@ -77,7 +77,7 @@ You just have to add the domain ( `example.com`) at the end of the line that sta Locally running programms - like your browser - will now resolve `example.com` as `127.0.0.1` -## Create A Virtual Network With Docker +## Create A Virtual Network With Docker Next, we have to create a virtual network, where we can put in both containers: @@ -103,7 +103,7 @@ Also, we are just experimenting here. _You might want to switch to Docker-Compose later._ _Especially, if you plan to set up an environment, that you will frequently reuse for manual tests or such._ -## Move The App Into The Virtual Network +## Move The App Into The Virtual Network To move our app into the virtual network, we have to start it again with the additional parameter **`--network`**. We also want to give it a name this time, by using **`--name`**, to be able to contact it by name. @@ -144,7 +144,7 @@ Summary of the changes in comparison to [the statement used in part 1](/howto-re - If you wonder, which containers are actually running, **`docker ps`** is your friend. -## Starting the Reverse-Proxy Aka Gateway +## Starting the Reverse-Proxy Aka Gateway Next, we will start NGINX alongside our app and configure it as reverse-proxy: diff --git a/content/blog/archive/2020/howto-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-running-your-app-in-docker.md b/content/blog/archive/2020/howto-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-running-your-app-in-docker.md index 68cf34a2..757745ee 100644 --- a/content/blog/archive/2020/howto-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-running-your-app-in-docker.md +++ b/content/blog/archive/2020/howto-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-running-your-app-in-docker.md @@ -63,7 +63,7 @@ At the date of the writing of this article it is up to date with version [2.2.2. _You may as well use any other OAuth2-application here. For example your own POC, if you already have build one that works while running on `localhost`_ -## Some Short Notes On OAuth2 +## Some Short Notes On OAuth2 I will only explain the protocol in very short words here, so that you can understand what goes wrong in case you stumble across one of the many pitfalls, when setting up oauth2. You can [read more about oauth2 elswhere](https://www.oauth.com/oauth2-servers/getting-ready/ "And you most probably should: At least if you are planning to use it in production!") @@ -94,7 +94,7 @@ Again, everything can be manually overriden, if needed. Configuration-keys starting with **`spring.security.oauth2.client.registration.github`** are choosing GitHub as the oauth2-provider and trigger a bunch of predifined default-configuration. If you have set up your own oauth2-provider, you have to configure everything manually. -## Running The App Inside Docker +## Running The App Inside Docker To faciliate the debugging - and because this most probably will be the way you are deploying your app anyway - we will start by building a docker-image from the app