How to Pass Brackets in URL Query for Komga

One of the reasons why I am still in the process of writing a piece on Komga is its weird quirks like this. As a comics and graphic novels manager, Komga has what I would consider Calibre has for graphical publications: lots of metadata managements, different lists that handle series and books, and more. But Komga has its own limits. One such limit, I have seen so many times, is that the web UI uses brackets in the URL for query. It often confuses browsers beyond limit.

Here’s an example. Let’s say I searched for John Doe as a writer, but soon realized it was actually Jane Doe. Normally, I would only need to change John to Jane in the URL. That is not quite the case with Komga. Doing so would throw HTTP 400 error. If I were to hazard a guess, the limitation was originally introduced as part of following URL encoding.

The quick fix itself is rather. Create a application.yaml file in ./config folder. It would live under compose.yaml, as most templates put it that way. But do double check the yaml.

Inside the application.yaml, copy paste the following content:

server:
  tomcat:
    relaxed-query-chars: '[,]'

It will let the Komga server to parse brackets instead of immediately throwing HTTP error. I suppose all community-driven DBs and managers have their own compromises, but at the very least, this was a problem I could at least comprehend why it happened. If I’m not mistaken, brackets are reserved only for IPs, and supposed to be encoded in the URL. It’s an oversight, no doubt, seeing as URL will be exposed to human eyes.

Leave a comment

Comments will be automatically closed after 30 days.