eunsoo <[email protected]> writes: > Hello. > I have installed mediawiki and mwlib on the same "Virtual" machine. > I carry the virtual machine in a USB flash and use it on various > physical machines, > so there can be no fixed FQDN for the mediawiki's web server. > > When I set up mwlib and tried to render a page, I got a "bad baseurl" > error which was reported multiple times before: > > http://groups.google.com/group/mwlib/browse_thread/thread/8334a3591153d651/0c7b166c65e5f686?lnk=gst&q=wgServer+localhost#0c7b166c65e5f686 > > I read some previous emails about the problem, but the suggested > solution was setting $wgServer, which does not work for my case since > I do not have a fixed FQDN. > > After digging the code a bit, I found that mwlib rejects all urls > starting with localhost. > > mwlib/serve.py: > 264 def is_good_baseurl(self, url): > 265 netloc = urlparse.urlparse(url)[1].lower() > 266 if netloc.startswith("localhost") or > netloc.startswith("127.0") or netloc.startswith("192.168"): > 267 return False > 268 return True > > Why does mwlib reject localhost? I commented out lines 266-267 and > found everything works perfectly. > If there is no serious intention on this code, I suggest to remove > this function.
People were trying to render these pages on our public render server and we got an email for each of those requests. That's the reason why we reject them. - Ralf -- You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/mwlib?hl=en.
