-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always proxy oncokb request #2864
Conversation
5ec3cf8
to
d871636
Compare
The new OncoKB website is no longer allowing cross domain requests. All requests need to be proxied and attach the auth header
d871636
to
7aea708
Compare
if (typeof url === 'string') { | ||
return buildCBioPortalAPIUrl(`proxy/${trimProtocol(url)}`); | ||
} else { | ||
return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does calling code handle undefined? I guess typescript would complain if it didn't, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, we inject these url to the client directly bypassing the constructer. It will have problem if url is undefined. But it seems like we will never run into this scenario since we have the serverConfigDefaults defined. @alisman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhx828 This looks fine to me, but does it still make sense to allow configuration of the OncoKB url on the frontend? Since now it's entirely through the proxy, maybe it shouldn't even be configurable
@inodb I agree. This is a fix to make sure any instances that do not wish to upgrade to 3.2(which oncokb auth will be included) can run smoothly. This will eliminate a cross-domain issue if the oncokb instance does not allow that. |
I took a look places where oncokb is used. They all work properly. |
The coming up new OncoKB website is no longer allowing cross domain requests. All requests need to be proxied and attached the auth header