Easiest way to make Scratchpad or Swish app only accept connections from localhost?

I am using SWI-Prolog 8.0.2 with Pengines. I want to be able to use Scratchpad/Swish for quick tests against my Pengines configuration. However, I only want those two apps to be available from localhost, as a security measure. What is the easiest way to set this up?

Also, is there an equivalent to SWIPL.INI for these two apps, some file I could edit so that certain code gets loaded into the Scratchpad/Swish code space whenever they are launched?

If you start swish using run.pl or ide.pl it only binds to the localhost interface by default. For configuration, swish reads all *.pl files in the directory config-enabled. You probably still need to create that directory. Next you can copy standard config stuff from config-available or add your own.

1 Like