View source with raw comments or as raw
   1:- module(conf_network, []).
   2:- use_module(library(settings)).
   3
   4/** <module> Configure the HTTP server
   5
   6Change  the  default  port  on  which    the  HTTP  server  listens.  If
   7host-detection does not work or this server   is behind a proxy, you may
   8also need the public_host/public_port settings.
   9
  10The =prefix= setting rebases all paths on   the  server to the indicated
  11path. Note that the prefix has *no* trailing /. E.g. a setting =|/demo|=
  12changes the root of the server to  =|/demo/|=. Rebasing a server is only
  13possible if internal path dependencies use   the  HTTP path mechanism to
  14find paths for internal services.
  15
  16The setting =workers= sets the number of   HTTP  worker threads. See the
  17link below for more info.
  18
  19@see	localhost.pl
  20@see	http_location_by_id/2 and http_link_to_id/3 for finding the
  21	locations of internal services.
  22@see	http://www.swi-prolog.org/howto/http/HTTPScale.html for more
  23	info on server scalability.
  24*/
  25
  26% :- set_setting_default(http:port, 8080).
  27% :- set_setting_default(http:public_host, 'www.example.org').
  28% :- set_setting_default(http:public_port, 80).
  29% :- set_setting_default(http:prefix, '/demo').
  30% :- set_setting_default(http:workers, 16).
  31
  32% Allow  CORS  enabled  access  by    default.   Needed  for  JavaScript
  33% applications loaded from other sites  to   access  the SPARQL endpoint
  34% other JSON or XML APIs of ClioPatria.   One of the features that needs
  35% it is YASGUI for accessing the server on http://localhost
  36
  37:- set_setting_default(http:cors, [*]).