Skip to content

Commit

Permalink
NGINX: inject the proper readthedocs-version-slug (#10870)
Browse files Browse the repository at this point in the history
I made a mistake and hardcoded `latest` when testing this, but it should be
`$rtd_version` which is grabbed from the HTTP header sent from the app.
  • Loading branch information
humitos authored Oct 25, 2023
1 parent dc2ec00 commit f9384df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dockerfiles/nginx/proxito.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ server {

# Inject our own script dynamically and project/version slugs into the HTML to emulate what CF worker does
# TODO: find a way to make this work _without_ running `npm run dev` from the `addons` repository
sub_filter '</head>' '<script async language="javascript" src="http://localhost:8000/readthedocs-addons.js"></script>\n<meta name="readthedocs-project-slug" content="$rtd_project" />\n<meta name="readthedocs-version-slug" content="latest" />\n</head>';
sub_filter '</head>' '<script async language="javascript" src="http://localhost:8000/readthedocs-addons.js"></script>\n<meta name="readthedocs-project-slug" content="$rtd_project" />\n<meta name="readthedocs-version-slug" content="$rtd_version" />\n</head>';
sub_filter_types text/html;
sub_filter_last_modified on;
sub_filter_once on;
Expand Down

0 comments on commit f9384df

Please sign in to comment.