0 Replies Latest reply on Apr 10, 2015 5:23 PM by Humberto Ferreira da Luz Jr.

    Hide real file name in undertow image-handler

    Humberto Ferreira da Luz Jr. Novice

      I tried the undertow image handler with the following configuration:


                  <server name="default-server">
                      <http-listener name="default" socket-binding="http"/>
                      <host name="default-host" alias="localhost">
                          <location name="/images" handler="images-handler"/>
                      <file name="images-handler" path="/opt/files" directory-listing="true"/>
                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>


      It works really great and I can access my images through http://ip:port/images/image_name.jpg. However I dont want the user to be able to guess the name of other images, like profile photos of other users by their identification.


      Does undertow support any way to hash the file name and display the hashed name in the url instead of its real name? Or will I have to try to use a url rewriter or maybe hash the image names in the filesystem?