mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
WebServer: Move server configuration into WebServer::Configuration
This moves the configuration of the web server, which currently only consists of the root path, into a new class, Configuration. Since the configuration is global and not per client, it is accessed by a singleton getter. This change simplifies future extensions of the configurable parameters.
This commit is contained in:
parent
2d18d3f329
commit
e77ca79897
6 changed files with 65 additions and 9 deletions
|
@ -19,7 +19,7 @@ public:
|
|||
void start();
|
||||
|
||||
private:
|
||||
Client(NonnullRefPtr<Core::TCPSocket>, String const&, Core::Object* parent);
|
||||
Client(NonnullRefPtr<Core::TCPSocket>, Core::Object* parent);
|
||||
|
||||
void handle_request(ReadonlyBytes);
|
||||
void send_response(InputStream&, HTTP::HttpRequest const&, String const& content_type);
|
||||
|
@ -30,7 +30,6 @@ private:
|
|||
void handle_directory_listing(String const& requested_path, String const& real_path, HTTP::HttpRequest const&);
|
||||
|
||||
NonnullRefPtr<Core::TCPSocket> m_socket;
|
||||
String m_root_path;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue