Skip to content

support nginx-adapter rewrite regexp #35

@Chise1

Description

@Chise1

I'm trying to add some functions to the nginx-adapter.I found that the rewrite of nginx-adapter seems not to support regular expressions
In nginx,config like :

  location ^~ /api {
    rewrite ^/api(/.*)$ $1 break;
    proxy_pass http://127.0.0.1:8000;
  }

It should be write :

	rewriteHandler := Rewrite{
		PathRegexp: []*regexReplacer{
			{
				Find:    "^/api(/.*)$",
				Replace: "$1",
			},
		},
	}

But regexReplacer can not be use in nginx-adapter. What should I do?

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