ispyb / EXI

Extended User Interface for ISPyB based on ISPyB's API
4 stars 14 forks source link

CORS policy problem #496

Open hormiai76 opened 5 years ago

hormiai76 commented 5 years ago

Hi, My EXI doesn't work. The browser console return to me the following messages:

index.html#/autoprocintegration/datacollection/15560/autoprocIntegration/17682/main:1 Access to XMLHttpRequest at 'https://ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/cc2' from origin 'https://exi-test.maxiv.lu.se' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/rfactor:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/rfactor:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index.html#/autoprocintegration/datacollection/15560/autoprocIntegration/17682/main:1 Access to XMLHttpRequest at 'https://ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/rfactor' from origin 'https://exi-test.maxiv.lu.se' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/completeness:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/completeness:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index.html#/autoprocintegration/datacollection/15560/autoprocIntegration/17682/main:1 Access to XMLHttpRequest at 'https://ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/completeness' from origin 'https://exi-test.maxiv.lu.se' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/isigma:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/isigma:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index.html#/autoprocintegration/datacollection/15560/autoprocIntegration/17682/main:1 Access to XMLHttpRequest at 'https://ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/isigma' from origin 'https://exi-test.maxiv.lu.se' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.`

It's a bug or I need to setup my server in a different way in order to avoid CORS problems? Regards, Alberto Nardella

antolinos commented 5 years ago

Hi Alberta,

Humm, it works here, did you check the logs of ISPyB?

antolinos commented 5 years ago

Have you tried this out of EXI (with a valid token)?

ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/completeness
hormiai76 commented 5 years ago

I fixed it using a valid certificate in the test server nnd adding the årpd ispyb certificatrein the trusted ones

Alberto


From: antolinos notifications@github.com Sent: Thursday, June 27, 2019 1:39:23 PM To: ispyb/EXI Cc: Alberto Nardella; Author Subject: Re: [ispyb/EXI] CORS policy problem (#496)

Have you tried this out of EXI (with a valid token)?

ispyb.maxiv.lu.se/ispyb/ispyb-ws/rest/52d20b806aabd5a3d2fba810370eacd4a667ab77/proposal/MX20180338/mx/autoprocintegration/17682/fastdp/completeness

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ispyb/EXI/issues/496?email_source=notifications&email_token=ACHHTZSUB5NCBGDAB5TZTWTP4SRGXA5CNFSM4HSQGLN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYW3B2Y#issuecomment-506310891, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACHHTZXUFKWOLZSCMW2O4LLP4SRGXANCNFSM4HSQGLNQ.