legumeinfo / ZZBrowse

Other
1 stars 1 forks source link

Replace legacy linkouts #45

Closed svengato closed 1 year ago

svengato commented 1 year ago

When you click on a gene (to pop up its linkouts), this error message comes up in the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://linkout.services.legumeinfo.org/gene_linkouts/?genes=vigun.IT97K-499-35.gnm1.ann1.Vigun05g038700. (Reason: CORS request did not succeed). Status code: (null).

adf-ncgr commented 1 year ago

@svengato I think you have the URL slightly wrong, try https://linkouts.services.legumeinfo.org instead of https://linkout.services.legumeinfo.org if that doesn't sort the issue, you might want to check with @nathanweeks who had pointed out that there is some issue in the way I've implemented CORS for the service although he was able to work around it in this deployment (I haven't yet been able to figure out what's going wrong with what I did, although I more or less just cribbed it from things @alancleary had done in other aiohttp services he had made for GCV)

svengato commented 1 year ago

Eurgh! There may be an extra trailing slash too, I will look at it when I get back.

nathanweeks commented 1 year ago

@svengato I think you have the URL slightly wrong, try https://linkouts.services.legumeinfo.org instead of https://linkout.services.legumeinfo.org...

That's right: it's "linkouts" instead of "linkout". CORS headers should be set by the reverse proxy:

$ curl -v https://linkouts.services.legumeinfo.org
...
< access-control-allow-origin: *
svengato commented 1 year ago

Fixed it, thanks. ZZBrowse now uses the new linkout service (in both development and production).

adf-ncgr commented 1 year ago

Thanks to you both for handling!