Skip to content
Advertisement

Header can not set – SlimFramework

I have the same problem again.

Old post here

I have a angular app and SlimFramework for api connect.

Local it works fine but when i publish to my Website come the error that my Header no set. But the info on the API testing tool says it’s allowed from * IP.

Can someone help me?

Here a valid token: Basic TyOSZcfBwMC6DR9kbAWeMnPmhF4ohZu2n9LccQEyt6uXNt8PTT

Thx

enter image description here

JavaScript

Advertisement

Answer

Your basic auth credentials do not decode into anything meaningful. PHP tends to silently ignore Authorization headers which it thinks are malformed. Try with something like Basic dGVzdDp0ZXN0 which decodes into test:test.

Workaround for this has however been added to Slim starting from version 3.5.0. Upgrading your Slim installation might also help.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement