temuujinmo4 commented on issue #17187:
URL: https://github.com/apache/superset/issues/17187#issuecomment-1401301886
Hi guys HELP ME. 403 Forbidden: You don't have the permission to access the
requested resource. It is either read-protected or not readable by the server
My backend superset_conifg.py
PUBLIC_ROLE_LIKE_GAMMA = True
GUEST_ROLE_NAME = "Gamma"SQLALCHEMY_ECHO = True
SESSION_COOKIE_SAMESITE = None
ENABLE_PROXY_FIX = True
FEATURE_FLAGS = {
"EMBEDDED_SUPERSET": True
}
I got guest token, My Frontend:
<div style="height: 100vh;">
<iframe id="superSet" width="100%" height="100%"></iframe>
</div>
getToken = () => {
$.ajax({
'type': 'POST',
'url': "**************",
'data': {},
'headers': {
'X-CSRFToken': "{{csrf_token}}",
},
'dataType': 'json',
'success': function (data) {
getGuestToken(data.access_token, data.refresh_token)
},
});
}
getGuestToken = (access_token, refresh_token) => {
$.ajax({
'type': 'POST',
'url': "******",
'data': {
'access_token': access_token,
'refresh_token': refresh_token
},
'headers': {
'X-CSRFToken': "{{csrf_token}}",
},
'dataType': 'json',
'success': function (data) {
supersetEmbeddedSdk.embedDashboard({
id: "*******************************",
supersetDomain: "********,
mountPoint: document.getElementById("superSet"),
fetchGuestToken: () => data['token'],
});
},
});
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]