Changing method jsopn for post with header Access-Control-Allow-Origin