Forums › Forums › OroCRM › OroCRM – Installation/Technical Issues or Problems › [OroCRM 3.1.6] Admin panel – 401 error on api/rest/latest/navigationitems/pinbar
This topic contains 24 replies, has 6 voices, and was last updated by Rick 4 years, 7 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- May 24, 2019 at 5:30 am #38938
Hi,
I installed OroCRM in local with docker. All is good I can access to the admin panel, but I got an reload infinitily in cause an 401 Unauthorized error on the url api/rest/latest/navigationitems/pinbar
Someone can help me ?
Thank you :)
- CreatorTopic
- AuthorReplies
- June 10, 2019 at 8:57 am #39086
Just checked again and it works for me.
Did you restart you nginx container after the change?
> if I wait 10sec on the dashboard, the page reload on the pinbar call
Please check the cookie set by https://orocrm.local it should start from Set-Cookie: https-_csrf=and check request headers to pinbar URL. It should contain X-CSRF-Header header.
June 10, 2019 at 10:28 am #39088Do you mind telling how did you fix it? Thanks.
June 10, 2019 at 11:00 pm #39090Hi Ilya,
My bad ! I forgot to remove cookies in my navigator, now it’s works thank you :)
July 12, 2019 at 7:45 am #39940I have the same issue. I am using a Docker php apache container.
Can somebody give me a solution for apache?July 12, 2019 at 8:44 am #39941Hi Rob,
You can use the recommended configuration from the Web server Configuration Guide.July 12, 2019 at 9:17 am #39942Thank you Andrey. I do have a similar configuration.
I am running the container is a Kubernetes cluster with an ingress loadbalancer.
I think the problem is caused by ssl offloading. Can you give me a clue where to look?July 15, 2019 at 3:56 am #39950Make sure “mod_ssl” is enabled.
Here is an example of the configuration used by our developers locally for Apache2 with SSL enabled:
Apache1234567891011121314151617<VirtualHost *:443>DocumentRoot "/var/www/commerce/public"ServerAdmin webmaster@localhostServerName commerce.localDirectoryIndex index.php index.html index.htm index.shtml<Directory "/var/www/commerce/public">Options FollowSymLinksOptions allAllowOverride All</Directory>ErrorLog ${APACHE_LOG_DIR}/b2b-mono-local-error.logCustomLog ${APACHE_LOG_DIR}/b2b-mono-local-access.log combinedSSLEngine onSSLCertificateFile /etc/ssl/certs/apache-selfsigned.crtSSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key</VirtualHost>July 15, 2019 at 4:34 am #39951Sorry Andrey I like use the reverse proxy and stick to the SSL offloading. Is there no way to tell to the ORO platform?
August 16, 2019 at 4:58 am #40215We had the same Problem using SSL offloading with AWS ElasticLoadbalancer.
Solution was to set the LoadBalancer as a TrustedProxy and set $_SERVER[‘HTTPS’] manually to any value (this is important to get https-_csrf form token instead of _csrf).index.php:
PHP123456789101112131415161718192021222324<?phpuse Symfony\Component\HttpFoundation\Request;/** @var \Composer\Autoload\ClassLoader $loader */$loader = require __DIR__ . '/../vendor/autoload.php';require_once __DIR__ . '/../src/AppKernel.php';$kernel = new AppKernel('prod', false);if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){$_SERVER['HTTPS'] = 'HTTP_USESSL';Request::setTrustedProxies(['127.0.0.1', $_SERVER['REMOTE_ADDR']],Request::HEADER_X_FORWARDED_AWS_ELB);}$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response); - AuthorReplies
The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.