Running Rails Development with a Fake Domain and SSL

28-Apr-2023 560
Sometimes you need to test a feature that requires not just SSL (https) but also to run under a certain domain. For example, testing an OAuth application will mean running your development environment at the right callback URL, especially when the OAuth provider doesn't support custom callbacks. Another example is testing FIDO or WebAuthn support: not only do these features need to run via SSL, but also under the right domain, which is not where your app will typically run before it's rolled out to production.This is a quick guide to a workaround to get your the development branch of your Rails app running via SSL and under your production URL.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle