Skip to content

How can I custom the Server header  #579

@mirror222

Description

@mirror222

Find the codes below, how can I change the response SERVER header to MYOWN.

Thank you.

image

`

        var server = new WebServer(o => o
                .WithCertificate(null)
                .WithUrlPrefix(url)
                .WithMode(HttpListenerMode.EmbedIO))
            .WithIPBanning(o => o
                .WithMaxRequestsPerSecond(30)                  
                .WithRegexRules("Too many requests 429"))
            .WithLocalSessionManager()
            .WithCors(
                // Origins, separated by comma without last slash
                "http://unosquare.github.io,http://run.plnkr.co",
                // Allowed headers
                "content-type, accept",
                // Allowed methods
                "post")
            .WithWebApi("/api", m => m
                .WithController<PeopleController>())
            .WithModule(new WebSocketChatModule("/chat"))
            .WithModule(new WebSocketTerminalModule("/terminal"))
            .WithStaticFolder("/", HtmlRootPath, true, m => m    //<----------
                .WithContentCaching(UseFileCache)                    
                );

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions