Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Can't use routes with $ in the name #156

Closed
cooperka opened this issue Jan 31, 2020 · 1 comment
Closed

Can't use routes with $ in the name #156

cooperka opened this issue Jan 31, 2020 · 1 comment

Comments

@cooperka
Copy link

cooperka commented Jan 31, 2020

The Microsoft OData specification requires a route called /$metadata that returns XML. In order to do this I tried to configure a route "/$metadata": "metadata.xml" but I get the following error:

2020-01-31T00:40:31.399282+00:00 app[web.1]: Starting nginx...
2020-01-31T00:40:31.422474+00:00 app[web.1]: nginx: [emerg] unknown "metadata" variable
2020-01-31T00:40:31.426489+00:00 app[web.1]: Process exited unexpectedly: nginx
2020-01-31T00:40:31.427292+00:00 app[web.1]: Going down, terminating child processes...
2020-01-31T00:40:31.480399+00:00 heroku[web.1]: Process exited with status 1
2020-01-31T00:40:32.345844+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/$metadata" host=foo.herokuapp.com status=503 bytes= protocol=https

I tried escaping the $ several ways and was unsuccessful.

Successful workaround, though not ideal, is to replace the $ with a *: "/*metadata": "metadata.xml"

@edmorley
Copy link
Member

edmorley commented Jun 9, 2022

Hi

This buildpack is now deprecated and we are recommending people move the more actively maintained heroku-buildpack-nginx. For migration advice see here.

As such, I'm closing this issue out since we won't be making further changes to this buildpack.

@edmorley edmorley closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants