Problem, help me , please?

I find this works as expected

“http.HandleFunc(”/@",startHandler)"

However if I replace the ‘@’ with ‘#’ I get a directory listing of the server account.

Just a thought that this might be a security issue.

Very useful for some no doubt.

Maybe there have been some CIA/Mossad people contributing to the open source community.

Hi @lacazet2k,

You can use path package to use a simple path-matching schemes, or you can use regular expressions to match your paths. :thinking: but listing directory, I think it is an issue… @lacazet2k can you post your code in your handler?

This code snippet illustrates a similar problem. that I came across

fune redirectToHttps(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, “https://xxxxxxxxxxxx.com:”+cfg.PortS+"/@", 307) // temporary for testing
}

As already pointed out in a neighboring thread, I doubt that there is a problem with gos libraries or handlers, but instead a configuration problem with involved reverse proxies.

I rather not to test the code or click https://xxxxxxxxxxxx.com link to redirect. How about pointing to a localhost:PORT/@ ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.