Open abdennour opened 3 years ago
Your issue seems to provide the answer here
No 'Access-Control-Allow-Origin' header is present on the requested resource.
So adding something like the following to your vhost config should do the trick:
Access-Control-Allow-Origin: *
or maybe something a bit more specific like the following
Access-Control-Allow-Origin: https://example.com
I'm having the same issue, I think it might be related to yourls / the plugin not respecting the session cookie after authentication and trying to reauthenticate the XHR requests against the openid provider.
Overview
I setup the plugin with keycloak & everything is going well (login, logout,...) , However... except when clicking on the button which generates new shorten link :
I am getting this error on the browser console:
steps to reproduce :
Run yourls v1.8.1
Installing the following plugins :
Deploy everything thru the official helm chart
Configure keycloak as following:![image](https://user-images.githubusercontent.com/1788384/127736557-4b551b2f-2d31-48df-9066-a282ba90ef13.png)
Expected Behavior
I would expect that all actions should be authenticated with keycloak without bugs and errors.
Actual Behavior
Actually, the API responsible for generating the shorten link (Which is the main functionality) is not working and it's thrown CORS issue
Attempts to fix :
Unfortunately, it does not work, and i am still getting the same issue.
Tips :
with redhat keycloak, it's not only realm url, client id, and client secret, but also you can pass other atteributes. Is it about supporting other attributes like
"enable-cors": true
. REF: https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.3/html/securing_applications_and_services_guide/openid_connect_3is this helpful also ? https://stackoverflow.com/a/60258569/747579