Skip to content

Commit

Permalink
Rename setcookie route to set_session_cookie
Browse files Browse the repository at this point in the history
Rename the route to set_session_cookie to convey that this endpoint
isn't used for tracking or serving ads.

Otherwise the path "/setcookie?" will get blocked by ad blockers
like uBlock Origin and wipr.
  • Loading branch information
dennisxrow committed Jan 24, 2019
1 parent f002baf commit ab920af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Controller/ApiController.php
Expand Up @@ -31,7 +31,7 @@ public function setAuthenticationAction(Request $request)
/**
* Set cookie from API server to my server
*
* @Route("/setcookie")
* @Route("/set_session_cookie")
* @Method({"GET", "POST"})
*
* @param Request $request
Expand Down Expand Up @@ -152,4 +152,4 @@ public function deleteSessionAction(Request $request, $sessionId)
{
return $this->get('xrow_rest.api.helper')->deleteSession($request, $sessionId);
}
}
}
4 changes: 2 additions & 2 deletions Controller/ApiControllerV2.php
Expand Up @@ -34,7 +34,7 @@ public function setOpenIDConnectAuthenticationAction(Request $request)
/**
* Set cookie from API server to my server
*
* @Route("/setcookie")
* @Route("/set_session_cookie")
* @Method({"GET", "POST"})
*
* @param Request $request
Expand Down Expand Up @@ -291,4 +291,4 @@ public function setLocalstorageTokenAction(Request $request)
}
return new JsonResponse();
}
}
}
4 changes: 2 additions & 2 deletions Resources/views/angular/openIDConnect/login.html.twig
Expand Up @@ -21,7 +21,7 @@
"openIDConnectURL": "{{oa_params.endpoint_rest}}/oicauth",
"apiSessionURL": "{{oa_params.endpoint_rest}}/session",
"apiLogoutURL": "{{oa_params.endpoint_rest}}/sessions",
"setcookieURL": "{{oa_params.endpoint_rest}}/setcookie",
"setcookieURL": "{{oa_params.endpoint_rest}}/set_session_cookie",
"checkSessionIframeURL": "{{oa_params.endpoint_rest}}/check_session_iframe"};
</script>

Expand All @@ -46,4 +46,4 @@
.then(null, console.error.bind(console));
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions Resources/views/page_head_script.html.twig
Expand Up @@ -13,7 +13,7 @@ var lsKeyName = 'xrowOpenIDConnect',
"openIDConnectURL": "{{oa_params.endpoint_rest}}/oicauth",
"apiSessionURL": "{{oa_params.endpoint_rest}}/session",
"apiLogoutURL": "{{oa_params.endpoint_rest}}/sessions",
"setcookieURL": "{{oa_params.endpoint_rest}}/setcookie",
"setcookieURL": "{{oa_params.endpoint_rest}}/set_session_cookie",
"checkSessionIframeURL": "{{oa_params.endpoint_rest}}/check_session_iframe"};
if (typeof pathToLoginTemplate === 'undefined') {
Expand Down Expand Up @@ -65,4 +65,4 @@ var callbackRestLoginFormErrorHandling = '{{oa_params.callback_function_if_restL
});
</script>
{% endif %}
{# ANGULAR 2 End #}
{# ANGULAR 2 End #}

0 comments on commit ab920af

Please sign in to comment.