mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Merge pull request #4994 from fregu/fix/readCallbackProvider
remove querystring from ctx.path when reading provider
This commit is contained in:
commit
a5881da622
@ -254,10 +254,11 @@ module.exports = {
|
||||
const [protocol, host] = strapi.config.url.split('://');
|
||||
_.defaultsDeep(grantConfig, { server: { protocol, host } });
|
||||
|
||||
const [requestPath] = ctx.request.url.split('?');
|
||||
const provider =
|
||||
process.platform === 'win32'
|
||||
? ctx.request.url.split('\\')[2]
|
||||
: ctx.request.url.split('/')[2];
|
||||
? requestPath.split('\\')[2]
|
||||
: requestPath.split('/')[2];
|
||||
const config = grantConfig[provider];
|
||||
|
||||
if (!_.get(config, 'enabled')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user