Host static files on an intranet
This guide explains how to run Casdoor in a network without internet access, where the default CDN for static files is unreachable.
Learning outcomes
- Serve the Casdoor static files from your own web server.
- Point Casdoor at that server.
What you need
- A web server that the users of your intranet can reach
- Access to
conf/app.confof your Casdoor instance
About static files
Casdoor loads default images, such as logos, avatars, and provider icons, from https://cdn.casbin.org. The files are in the casbin/static repository. Without access to that CDN, the images don't load.
Serve the static files
- On a machine with internet access, clone casbin/static.
- Copy the files to a web server inside your intranet and serve them over HTTP or HTTPS.
Point Casdoor at your server
-
In
conf/app.conf, replace the default value ofstaticBaseUrlwith the base URL of your web server:staticBaseUrl = "https://cdn.casbin.org" -
Restart Casdoor.