Passage
That, according as it is written, He that glorieth, let him glory in the Lord.
That, according as it is written, He that glorieth, let him glory in the Lord.
1 Corinthians 1:29 That no flesh should glory in his presence.
1 Corinthians 1:30 But of him are ye in Christ Jesus, who of God is made unto us wisdom, and righteousness, and sanctification, and redemption:
1 Corinthians 1:31 That, according as it is written, He that glorieth, let him glory in the Lord.
The verse centers on "written", "glorieth", "glory", and "lord". It is saying that the verse draws attention to "written" and "glorieth", so its meaning should be read from those terms before moving to application.
The prior verse says "But of him are ye in Christ...", giving immediate footing for "written" and "glorieth". In 1 Corinthians context, the local focus is Christ, faith, and discipleship.
A plain takeaway is to answer the verse's own emphasis on "written" and "glorieth" with trust shaped by these words, not by a vague optimism outside the passage.