org-arl / fjage

Framework for Java and Groovy Agents
https://fjage.readthedocs.io/en/latest/
Other
26 stars 13 forks source link

Use the canonicalPath when serving local directories #270

Closed notthetup closed 1 year ago

notthetup commented 1 year ago

Instead of using getAbsolutePath, use getCanonicalPath when adding contexts for serving local directories. getCanonicalPath traverses symlinks, while getAbsolutePath doesn't.

Serving something across a symlink is frowned upon by jetty. So it's recommended to use the canonical paths to add context for statically serving files.