okpy / ok

ok.py supports programming projects by running tests, tracking progress, and assisting in debugging.
Apache License 2.0
336 stars 84 forks source link

Enable hosting server at a non-root URL #1300

Closed c-w closed 6 years ago

c-w commented 6 years ago

This change enables us to host the Flask OKpy server at a non-root URL, e.g. prefixing all the routes with /foo. The non-root URL host is enabled by setting the following environment variables:

SCRIPT_NAME=/foo
APPLICATION_ROOT=/foo

Being able to host the application at a non-root URL enables use-cases such as for example a single SSL certificate and DNS entry being used for both the OKpy application and the AutoPY application with routing between the two applications being done by a URL prefix.