set correct path when post request is received