William D. Williams, a Florida prisoner, appeals a district court order dismissing *683his pro se 42 U.S.C. § 1983 civil rights action, pursuant to 28 U.S.C. § 1915(e)(2)(B)(i), as frivolous. Because the district court properly concluded that (1) the prison’s policy of prohibiting Williams from removing his shoes before entering the prison chapel was reasonably related to the legitimate penological objective of maintaining safety and security, and (2) Williams failed to name any other inmates who had been allowed to remove their shoes prior to entering the prison chapel, the district court did not abuse its discretion by dismissing Williams’s complaint. Accordingly, we AFFIRM.
I. BACKGROUND
Williams, a Florida prisoner, filed a pro se civil rights action, pursuant to 42 U.S.C. § 1983 and 42 U.S.C. § 2000bb, the Religious Freedom Restoration Act (“RFRA”), against the Secretary for the Department of Corrections, both individually and in his official capacity, and James Crosby, Bill Bedinfield, Dennis Durant, Sgt. Cannady, and Major Highland, in their individual and official capacities, claiming that they violated his equal protection rights, as well as his right to freely exercise his religion, because they did not allow him to remove his shoes before entering the prison chapel.
Williams alleged that while attending chapel services at the prison, Sgt. Cannady informed him that he must wear shoes before entering the chapel, and, that if he did not, he would not be allowed to continue to participate in the religious service. Williams informed Sgt. Cannady that: (1) the sanctuary was holy ground that would be desecrated by the wearing of shoes, (2) the removal of shoes while conducting religious activities was a practice observed by many religious groups, and (3) it had been his practice to remove his shoes before entering a sanctuary for eight years. In addition, Williams stated that God had personally commanded him to remove his shoes before entering a sanctuary, and that this practice was supported by the scriptures. Williams alleged that despite making known his beliefs, Sgt. Cannady would not allow him to participate in religious activities without his shoes on, and thus, he decided not to return to the chapel. .
Williams indicated that he had filed an informal grievance with Major Highland. In response, Williams alleged that Major Highland stated that he was not aware of any denomination which removed their shoes before entering the chapel and he therefore ordered Williams to keep his shoes on if he desired to participate in chapel services. Similarly, Durant, the prison chaplain, noting that Williams had announced his affiliation with the Baptist denomination, indicated that there was no requirement in the Baptist religion to remove ones’ shoes in the chapel. Warden Bedinfield responded to Williams’s grievance by informing Williams that the prison required all inmates to wear shoes for security reasons.
In sum, Williams alleged that because the defendants’ actions denied him access to the chapel, and that other religions, specifically Muslims, were not subjected to the same prohibition, the defendants violated the First Amendment, the Equal Protection Clause of the Fourteenth Amendment, and the RFRA. For relief, Williams demanded compensatory and punitive damages of $150,000 from each defendant, an injunction against the prohibition, and a declaratory judgment.
The district court, sua sponte, dismissed Williams’s complaint as frivolous, pursuant to § 1915(e)(2)(B)(i), after finding that Williams had “little or no chance of success” on a claim of constitutional deprivation. Rl-14 at 5. The district court noted *684that because the Supreme Court held that the RFRA was unconstitutional in City of Boerne v. Flores, 521 U.S. 507, 536, 117 S.Ct. 2157, 2172, 138 L.Ed.2d 624 (1997), any claims raised by Williams pursuant to that Act would be dismissed. Addressing Williams’s constitutional claims, the district court, citing Turner v. Safley, 482 U.S. 78, 89, 107 S.Ct. 2254, 2261, 96 L.Ed.2d 64 (1987), observed out that when a prison policy interferes with an inmate’s constitutional rights, there is no constitutional violation if the policy is reasonably related to a legitimate penological interest. Applying this standard to Williams’s case, the district court noted that the prison officials, in response to Williams’s initial grievance, indicated that the removal of garments within a prison becomes a security issue. Although the defendants did not file a responsive pleading, the district court accepted the security justification put forth by the defendants in response to Williams’s grievance, and concluded that the policy of prohibiting the removal of shoes was connected to a legitimate government interest in maintaining security within the prison. As to the reasonableness of the prison’s policy, the district court recognized that Williams had available alternative means of exercising his right to freely practice his religious beliefs. Specifically, the court observed that Williams could remove his shoes in his cell and pray there without negatively affecting the safety and security of the other inmates, himself, or the prison authorities. With respect to Williams’s equal protection claim, the district court found that Williams had failed to establish that any other inmates had been allowed to remove their shoes prior to entering the chapel. Accordingly, the district court dismissed the complaint as frivolous.
II. DISCUSSION
On appeal, Williams argues that the district court abused its discretion when it dismissed his § 1983 complaint as frivolous. Specifically, Williams claims that because the correctional facility allowed inmates of the Islamic or Muslim faith to remove their shoes, but prohibited him, as a Christian, from removing his shoes because of security concerns, the defendants violated the First Amendment and the Equal Protection Clause of the Fourteenth Amendment. Therefore, Williams asserts that he has demonstrated a likelihood of success on his claim of constitutional deprivation. Similarly, Williams contends that because the defendants filed no responsive pleadings, the district court abused its discretion by accepting outright the security justification put forth by Warden Bedenfield in his response to Williams’s grievance. Thus, Williams argues that the district court abused its discretion when it prematurely dismissed his complaint as frivolous without requiring the defendants to demonstrate exactly how the practice of removing one’s shoes in prison creates a security risk. Finally, Williams maintains that the defendants’ justification for the prohibition could not be construed by the district court as either legitimate or reasonable because there is no logical connection between the prison’s policy of forbidding the removal of clothing garments and maintaining prison safety and security.
In forma pauperis (IFP) proceedings are governed by 28 U.S.C. § 1915. Subsection (e)(2) of that statute provides that “ ... the court shall dismiss the case at any time if the court determines that—... (B) the action or appeal—(i) is frivolous or malicious.... ” 28 U.S.C. § 1915(e)(2)(B)®. “[T]he statute accords judges not only the authority to dismiss a claim based on an indisputably meritless legal theory, but also the unusual power to pierce the veil of the complaint’s factual allegations and dismiss those claims whose *685factual contentions are clearly baseless.” Neitzke v. Williams, 490 U.S. 319, 327, 109 S.Ct. 1827, 1833, 104 L.Ed.2d 338 (1989).
We review a district court’s sua sponte dismissal of a claim as frivolous under § 1915(e)(2)(B)(i) for abuse of discretion. Bilal v. Driver, 251 F.3d 1346, 1349 (11th Cir.2001). “A claim is frivolous if it is without arguable merit either in law or fact,” or has little or no chance of success. Id.
To the extent that Williams sought relief under the RFRA, the Supreme Court held that the RFRA was unconstitutional in City of Boerne, 521 U.S. at 532-33, 117 S.Ct. at 2170-71. Therefore, the district court did not abuse its discretion by dismissing any claims raised by Williams pursuant to that Act.
“In order to prevail on a civil rights action under § 1983, a plaintiff must show that he or she was deprived of a federal right by a person acting under color of state law.” Griffin v. City of Opa-Locka, 261 F.3d 1295, 1303 (11th Cir.2001). Importantly, inmates retain the First Amendment guarantee that no law shall prohibit the free exercise of religion, Cruz v. Beto, 405 U.S. 319, 322, 92 S.Ct. 1079, 1081-82, 31 L.Ed.2d 263 (1972). Unlike the strict standards of scrutiny applicable to the constitutional rights of persons in free society, however, the Supreme Court has announced a deferential reasonableness standard for determining whether a prison regulation violates a prisoner’s constitutional rights. See Turner, 482 U.S. at 89, 107 S.Ct. at 2261.
When assessing whether a prisoner was deprived of his constitutionally protected right to freely practice his religion, we have held that the district court must first “determine whether the prisoner is sincere in his or her asserted religious beliefs.” Martinelli v. Dugger, 817 F.2d 1499, 1503 (11th Cir.1987). In other words, “[a] claimant meets this initial burden ... if he or she proves that the beliefs are truly held and [are] religious in nature.” Id. at 1504. Once the district court determines that the prisoner has a sincere free-exercise claim, it must evaluate whether the prison regulation or policy is reasonably related to a legitimate penological interest. McCorkle v. Johnson, 881 F.2d 993, 995-96 (11th Cir.1989) (per curiam). It is important to note that the reasonableness test is applied with a wide-ranging deference to the expert judgment of prison administrators. See Brightly v. Wainwright, 814 F.2d 612, 613 (11th Cir.1987) (per curiam).
There are several considerations that must be taken into account when examining the reasonableness of a prison regulation that infringes on an inmate’s protected constitutional rights. First, there must be a “ ‘valid, rational connection’ between the prison restriction and the legitimate governmental interest put forward to justify .it.” McCorkle, 881 F.2d at 995 (quoting Turner, 482 U.S. at 889, 107 S.Ct. at 2262 (internal citation omitted)). Second, the district court must examine whether “alternative means of exercising the asserted right remain open.” Id. at 996. “The inquiry is whether, under the restrictions imposed, the plaintiff is deprived of all means of practicing his ‘religion.’ ” Id. (quotation omitted). Third, the district court must consider the impact that accommodating “the asserted constitutional right will have on guards and other inmates, and on the allocation of prison resources generally.” Id. Finally, the district court must determine “whether the regulation represents an ‘exaggerated response’ to prison concerns.” Hakim v. Hicks, 223 F.3d 1244, 1247-48 (11th Cir. 2000) (citation omitted).
In order to properly plead an equal protection claim, a plaintiff need only allege *686that similarly situated persons have been treated disparately through state action. Thigpen v. Bibb County, Ga., Sheriffs Dept., 223 F.3d 1231, 1237-39 (11th Cir. 2000). If the plaintiff is not in a protected class, “we review ... discriminatory treatment to see if it has a rational basis.” Bass v. Perrin, 170 F.3d 1312, 1319 (11th Cir.1999). Under rational basis review, the court identifies a legitimate government purpose and determines whether a rational basis exists for the government to believe that its action would further the government’s purpose. Heller v. Doe by Doe, 509 U.S. 312, 319-20, 113 S.Ct. 2637, 2642,125 L.Ed.2d 257 (1993).
As an initial matter, it is important to note that the district court dismissed Williams’s complaint before the defendants filed any responsive pleadings, and instead relied upon Warden Bedenfield’s response to Williams’s grievance as the basis for its finding that the complaint was frivolous. Although Williams takes issue with this type of summary disposition, the plain language of § 1915(e)(2)(B)(i) explicitly provides that the district court is required to “dismiss the case at any time if the court determines ... the action ... is frivolous.” (emphasis added). Although we have recognized that, in order to make a truly informed decision, the district court usually requires service of process and the defendant’s answer before making a determination as to frivolousness, we have also noted that there are compelling reasons for immediately dismissing frivolous actions by prisoners, especially since frivolous suits “unduly burden the courts, obscure meritorious claims, and require innocent parties to expend significant resources in their defense.” Phillips v. Mashbum, 746 F.2d 782, 784-85 (11th Cir. 1984) (per curiam) (discussing 28 U.S.C. § 1915(d), which is the precursor to 28 U.S.C. § 1915(e)). Extending the latter part of this reasoning, we have held that a district court “may conclude a case has little or no chance of success and dismiss the complaint before service of process when it determines from the face of the complaint that the factual allegations are clearly baseless or that the legal theories are indisputably meritless.” Carroll v. Gross, 984 F.2d 392, 393 (11th Cir.1993) (per curiam) (internal quotations omitted).
In this case, the district court correctly found that Williams’s allegations were frivolous. Although the district court’s order did not specifically address the sincerity of Williams’s belief that he was required to remove his shoes before entering the chapel, it nevertheless appears that the district court presumed that Williams’s beliefs were truly held and rooted in religious belief because the district court’s inquiry into the reasonableness of the prison regulation at issue herein was necessarily predicated on a finding of sincerity. Thus, the true question on this appeal is whether the district court abused its discretion in finding that the prison’s policy forbidding the removal of Whilliams’s shoes was reasonably related to a legitimate penological interest.
Although Williams argues to the contrary, the district court did not abuse its discretion in finding the prison policy reasonably related to a legitimate penological interest. There was rational connection between the prison regulation prohibiting the removal of Williams’s shoes and the legitimate governmental interest of maintaining prison safety and security. As to the issue of reasonableness under the Turner standard, the district court explicitly noted that William’s had alternative means of exercising his right to freely practice his religion, especially since he had the option of retiring to his cell and removing his shoes in order to pray. Moreover, the court acknowledged that such an accom*687modation would not negatively impact the safety and security of the other inmates, the guards, or Williams himself. The court noted that the regulation did not appear to be an exaggerated response to legitimate prison concerns for security. After taking these factors into consideration, the district court properly concluded that the prison’s policy of prohibiting Williams from removing his shoes was reasonably related to the legitimate penological objective of maintaining safety and security.
Addressing Williams’s equal protection claim, the district court also properly dismissed Williams’s complaint as frivolous. Citing Major Highland’s response to Williams’s grievance, in which Highland stated that he was unaware of any denominations within the prison that engaged in the practice of removing their shoes before entering the prison chapel, the district court was within its discretion to find that there was no disparate treatment, and therefore no constitutionally significant deprivation, given that Williams failed to allege facts showing that any other specific inmate in that institution had been allowed to remove his shoes prior to entering the prison chapel. Although Williams vaguely alludes to a religious sect that does engage in the practice of shoe removal before entering the prison chapel, Williams did not allege, or name, any specific inmates who engaged in the practice at the particular correctional facility to which he was confined.
III. CONCLUSION
Because Williams’s did not demonstrate that he was unconstitutionally deprived of a protected federal right, either under the First Amendment or the Equal Protection Clause, the district court did not abuse its discretion by dismissing Williams’s complaint as frivolous, pursuant to § 1915(e)(2)(B)(i). Accordingly, we AFFIRM.