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

document catch-all redirect hack #513

Merged
merged 2 commits into from
May 3, 2019
Merged

document catch-all redirect hack #513

merged 2 commits into from
May 3, 2019

Conversation

thornjad
Copy link
Member

@thornjad thornjad commented Apr 15, 2019

Documents the -P http://localhost:8080? proxy hack from #338 (comment) in the Readme

Fixes #338, closes #331, closes #194, closes #80

@thornjad thornjad added this to the v0.12.0 milestone Apr 15, 2019
@thornjad
Copy link
Member Author

@BigBlueHat @houston3 what do you think about the wording here?

@houston3
Copy link

Looks good to me.

Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

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

Look great, @thornjad. Merging shortly. 😃

@BigBlueHat BigBlueHat merged commit f42d662 into master May 3, 2019
@grundmanise
Copy link

This does not work with ssl certificates, though

/node_modules/http-server/node_modules/http-proxy/lib/http-proxy/index.js:120
    throw err;
    ^

Error: unable to verify the first certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1055:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket._finishInit (_tls_wrap.js:633:8)
error Command failed with exit code 1.

@thornjad thornjad deleted the catch_all_dx branch December 19, 2019 14:54
@oller
Copy link

oller commented Feb 5, 2020

Encountering the same issue as @grundmanise , no SSL support for fallback routing. Did you find an alternative package to meet these requirements @grundmanise ? Thanks!

@grundmanise
Copy link

grundmanise commented Feb 6, 2020

This command worked for me..yes, with sudo 🤷‍♂️

$ sudo npx http-server ./build -p 433 -a whatever.com -S -C ./ssl/_wildcard.pem -K ./ssl/_wildcard.key.pem -c-1

Prior to running it you should also add 127.0.0.1 whatever.com to your hosts file /private/etc/hosts and generate those ssl certificates. I don't remember which lib I've used to generate certificates, but you can try pem.

I also had to rewrite webpack certificates on every run (?) if I'm not mistaken. But maybe that's due to CRA:

$ rm -f ./node_modules/webpack-dev-server/ssl/server.pem && cat ./ssl/server.pem > ./node_modules/webpack-dev-server/ssl/server.pem

otherwise it didn't work for me. server.pem is a file that has both key and certificate in it (i.e. _wildcard.pem + _wildcard.key.pem).

I could be doing it wrong, so if any one knows an easier solution pls comment.

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.

How to add catch all redirect? with react-router error 404 Support HTML5 push-state
5 participants