I am developing a plugin to verify the user and serve the requested web page after validation. For the validation purpose, I have a html page in go. The go page looks like the following:
const redirectPageTemplate = `Some html with form for validation`
I use the following go code to show this page:
tpl, err := template.New("authPage").Parse(redirectPageTemplate) err = tpl.Execute(w, data)
Now I have some images and css for the page. How the path actually works when the proxy serves the page? I put my images and other resources to resources/ path. I used the path of the image in the code as src="/resources/logo.jpg", but the page doesn’t show the image. It says it cannot find the image.
Where should I put the images and how can I show them in my page? The same question apply for any css files and corresponding classes.
Any help is highly appreciated.