Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reverse proxy deploy support, fixed issue #59 #60

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

MegatronKing
Copy link
Contributor

This commit provides two solutions.
Config the nginx like this:

 location / {
	proxy_http_version 1.1;
	proxy_set_header proxy-origin https://pub.example.com/;
	proxy_pass http://localhost:4000/;
}

Another way, we can assign a proxy when starts the server:

unpub --proxy-origin https://pub.example.com

This commit provides two solutions.
Config the nginx like this:
```
 location / {
	proxy_http_version 1.1;
	proxy_set_header proxy-origin https://pub.example.com/;
	proxy_pass http://localhost:4000/;
}
```
Another way, we can assign a proxy url in unpub.dart
```
var app = unpub.App(
    metaStore: unpub.MongoStore(db),
    packageStore: unpub.FileStore(baseDir),
    proxy_origin: 'https://pub.example.com/'
  );
```
@talisk talisk merged commit 5a7aaa0 into pd4d10:master Jun 2, 2022
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