Section 39.2 Configuring a webwork2 Server for PreTeXt
Note that the default
webwork2 server for PreTeXt is webwork-ptx.aimath.org, and this server is already configured. If you are configuring your own WeBWorK server, read on.
We assume a mild familiarity with administrating a WeBWorK server. The version of WeBWorK needs to be 2.19 or later for use with PreTeXt.
The only thing you need to do at the serverlevel is set the web server to use certain headers on content that is fetched. These headers tell a web browser that you are authorizing it to display content from this web server as embedded content inside pages from another web server (in particular, where you are hosting you PreTeXt book).
Edit
webwork2/conf/webwork2.mojolicious.yml and uncomment these lines:
extra_headers:
/webwork2/render_rpc:
Access-Control-Allow-Origin: '*'
/webwork2_files:
Access-Control-Allow-Origin: '*'
/pg_files:
Access-Control-Allow-Origin: '*'
There may be additional lines concerning the
html2xml endpoint, and those can remain commented out unless you have some other reason to uncomment them.
Also in this same file, set
allow_unsecured_rpc: 1. You will need to restart the webwork2 service.
You have attempted of activities on this page.
