Re:Ask HN: Is it permitted to proxy HackerNews actions
by anilgulecha on Wednesday May 10, 2017 @04:19AM
(#14306677)
There's non CORS issue if you control the client (an app). The login POST call on news.ycombinator.com is the API you need.
If you want it as a website/in the browser, then you can make an extension instead of an app (going to yoursite.com should request installing extension, or load the site if extension is present).
The point is I want to have a different site (eg. myawesomehnsite.com) that will use the firebase api for a reader but allow the user to upvote or comment on my site and proxy that action to news.ycombinator.com. Unless they expose some API to do it, which AFAIK they don't, you don't have a way to do this entirely in the browser. You'll hit cross-site XHR issues or the requests will not be authorized (look at the link for an upvote - it has an auth qs var - this is custom per user per link).