Page MenuHomePhorge

AllowedHosts middleware to restrict allowed hosts
ClosedPublic

Authored by mollekopf on Apr 3 2024, 1:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 7:33 PM
Unknown Object (File)
Fri, May 17, 8:57 AM
Unknown Object (File)
Fri, May 17, 8:51 AM
Unknown Object (File)
Fri, May 17, 8:50 AM
Unknown Object (File)
Thu, May 16, 10:41 AM
Unknown Object (File)
Sat, May 11, 1:46 PM
Unknown Object (File)
Sat, May 11, 1:39 PM
Unknown Object (File)
Sat, May 11, 1:33 PM
Subscribers

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rKa89b72e22ff2: AllowedHosts middleware to restrict allowed hosts

Diff Detail

Repository
rK kolab
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 47004
Build 17931: arc lint + arc unit

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Apr 3 2024, 1:05 PM

There's a domain/hosts confusion. I went with hosts for the middleware because that also used for e.g. the TrustHosts middleware, but with domain in the config because that's what we use for the other configs ¯\_(ツ)_/¯

machniak subscribed.
machniak added inline comments.
src/config/app.php
87–88

I think services_domain is not used anymore and should be removed.

src/routes/api.php
210

It would be cleaner if we did 'allowedHosts:services' or just 'allowedHosts' here and read the config inside the middleware.

This revision now requires changes to proceed.Apr 4 2024, 10:54 AM
This revision is now accepted and ready to land.Apr 5 2024, 12:11 PM