thenets / docker-parsoid

Containerized MediaWiki parsoid service
MIT License
21 stars 17 forks source link

improved uri/domain handling #19

Closed potatogim closed 1 year ago

potatogim commented 3 years ago

Hello! :smile:

First of all, I'm really appreciate for your working with parsoid!

I'm using it with my personal wiki and I found a little improvement for it.

If we use it with a domain like below

PARSOID_DOMAIN_personal=https://personal.com/w/api.php

The request has failed like that

$ curl -L http://personal.net:8142/personal.com/v3/page/pagebundle/Main_Page
{"error":"Invalid domain: personal"}

IMHO, it is caused by domain attribute in config file.

mwApis:
  -
    uri: 'https://personal.com/w/api.php'
    domain: 'personal'

But in some situations, we should use FQDN for the domain attribute and we can meet these requirements with a little changes in this PR.

If you don't mind, Could you consider these changes? :smile:

Signed-off-by: Ji-Hyeon Gim potatogim@potatogim.net

octfx commented 3 years ago

Heya @potatogim I've fored this repository and incorporated your PR: https://github.com/StarCitizenWiki/docker-parsoid

You can pull the docker image using scwiki/parsoid. Do mind though that this image uses Parsoid 0.12.