Img src path with header params to pass

前端 未结 4 725
攒了一身酷
攒了一身酷 2020-12-03 02:07

I have an img tag in jsp page where the src path requires header parameters to pass to get the image. How can we achieve it?

4条回答
  •  感情败类
    2020-12-03 02:34

    You can't access to the header params with the img tag, you've got two solutions :

    Use an Ajax request with the header param and load the image data

    Use GET parameters with a token to replace the header for this functionality

提交回复
热议问题