Skip to content

docs: enable example templating#314

Merged
aeneasr merged 6 commits intomasterfrom
fix/enable-usage-templating
Jan 8, 2024
Merged

docs: enable example templating#314
aeneasr merged 6 commits intomasterfrom
fix/enable-usage-templating

Conversation

@zepatrik
Copy link
Copy Markdown
Member

Currently example strings are not templated, resulting in e.g.
image

With this dependency bump, the clidocs generated content is correct now: ory/x#707

I had to update all services because of breaking changes in ory/x

Comment on lines +203 to 221
proxy.WithReqMiddleware(func(r *httputil.ProxyRequest, c *proxy.HostConfig, body []byte) ([]byte, error) {
if r.In.URL.Host == conf.oryURL.Host {
r.Out.URL.Path = strings.TrimPrefix(r.In.URL.Path, conf.pathPrefix)
r.Out.Host = conf.oryURL.Host
} else if conf.rewriteHost {
r.Header.Set("X-Forwarded-Host", r.Host)
r.Host = c.UpstreamHost
r.Out.Header.Set("X-Forwarded-Host", r.In.Host)
r.Out.Host = c.UpstreamHost
}

publicURL := conf.publicURL
if conf.pathPrefix != "" {
publicURL = urlx.AppendPaths(publicURL, conf.pathPrefix)
}

r.Header.Set("Ory-No-Custom-Domain-Redirect", "true")
r.Header.Set("Ory-Base-URL-Rewrite", publicURL.String())
r.Out.Header.Set("Ory-No-Custom-Domain-Redirect", "true")
r.Out.Header.Set("Ory-Base-URL-Rewrite", publicURL.String())
if len(apiKey) > 0 {
r.Header.Set("Ory-Base-URL-Rewrite-Token", apiKey)
r.Out.Header.Set("Ory-Base-URL-Rewrite-Token", apiKey)
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pay attention to this, but should be correct 😅

zepatrik and others added 5 commits July 26, 2023 13:15
…mplating

# Conflicts:
#	.github/workflows/ci.yaml
#	.github/workflows/format.yml
#	.github/workflows/licenses.yml
#	.github/workflows/test-e2e.yml
#	.github/workflows/test.yml
#	cmd/cloudx/proxy/proxy.go
#	go.mod
#	go.sum
@aeneasr aeneasr merged commit d65f6d0 into master Jan 8, 2024
@aeneasr aeneasr deleted the fix/enable-usage-templating branch January 8, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants