Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Redirect HTTP to HTTPS #73

Closed
rickr opened this issue May 13, 2017 · 3 comments
Closed

Redirect HTTP to HTTPS #73

rickr opened this issue May 13, 2017 · 3 comments

Comments

@rickr
Copy link
Contributor

rickr commented May 13, 2017

Anyone visiting any HTTP URL should be redirected from HTTP to HTTPS with the same URL and query params.

@tskuse
Copy link
Contributor

tskuse commented Jun 3, 2017

@rickr, Would you mind taking a look at tskuse@3c1b456 ?

Enabling Express trust proxy:

(Recommend reviewing config options: http://expressjs.com/en/guide/behind-proxies.html. I'm not fully aware of the serving arrangement.)

Although the app will not fail to run if the application variable trust proxy is not set, it will incorrectly register the proxy’s IP address as the client IP address unless trust proxy is configured.

Setting a non-false trust proxy value results in three important changes:

  • The value of req.hostname is derived from the value set in the X-Forwarded-Host header, which can be set by the client or by the proxy.

  • X-Forwarded-Proto can be set by the reverse proxy to tell the app whether it is https or http or even an invalid name. This value is reflected by req.protocol.

  • The req.ip and req.ips values are populated with the list of addresses from X-Forwarded-For.

@rickr
Copy link
Contributor Author

rickr commented Jun 5, 2017

That looks like a sane change. We can merge it in and test it out in prod before we launch this week.

@rickr
Copy link
Contributor Author

rickr commented Jun 5, 2017

Fixed in #95

@rickr rickr closed this as completed Jun 5, 2017
sethbergman added a commit to sethbergman/operationcode_frontend that referenced this issue Jul 15, 2017
* Resize images on landing to fix format issues

* Remove unnecessary usage of React Router

* Remove unnecessary usage of React Router

* Make minor style and content adjustments

* Make minor style and content adjustments

* Add new section for online schools and MOOCs

* Make minor style and content adjustments

* Decrease section gutter size

* Fix format issues with school cards

* Remove TODO comment - feature implemented

* Add proxy support for HTTP->HTTPs redirect (OperationCode#73)

* Build out the search function for stateApproved component, currently non-funcitoning

* Refactor the search function for easier reading

* Add a working search function to the stateApproved seciton

* Fix typo in Massachussetts

* Implement fuzzy search and fix flex display of results

* Add functionality that clears fuzzy search results

* Add image alt's to all code school sections and add key's to all mappings

* Add "stateCode": "stateName" JSON for fuzzy search

* Near-complete fix of fuzzy search - bug in log

When a user searches for "Car" a single code school shows up from North Carolina. In actuality, two schools should appear; one from NC, and one from SC.

* Use API for json endpoint

* Use API for json endpoint - bug in log

- If a school has multiple VA-Approved locations, only one will show

* Break fuzzy search - bugs in log

The bug lies in me being unable to dynamically render the nested locations of each school. I'm sure the problem is easily fixable, but I'm running low on sleep and have to call it a night, but I'm pushing the code I've gotten done anyways.

* Adjust the search function to return schools again

* Add styles to paragraph text across the code schools page

* Push progress for Evan

* Push progress for Evan - SchoolCard rendering now

* Complete Schools By State section

* Create PULL_REQUEST_TEMPLATE.md

* Create ISSUE_TEMPLATE.md

* Add key and alt to SchoolCards

* Push progress for Spence

* update

* Reorganize fetches to stop breaking lifecycle

* Remove schools.json

* Fix tests - pass code schools as a prop to child components

* Fix online school rendering with API

* Add error-handling to fuzzy search and fix render

Found a bug that may occur is there is a typo within the state field of a school within the code_schools API endpoint.
Added error handling for if that situation occurs again.
Variable names changed.
Rendering functionality changed to cope with new API implementation.

* Make SchoolCard keys random and disable error-handling lint warning

* Make all SchoolCard component key attributes unique

* Add missing code school logos

* Various fixes to appease CodeClimate check

* Fix typo in AccordianItem.css

* Fix some CodeClimate issues

* Make fix addressing @alexspence review

* Fix horrible safari rendering fixes OperationCode#109

* Update labels.json

* Add partner logos

* Implement complete parter section with logos

* Adds browserstack badge

* Copy and style changes on mentorship section

* Copy revision to partners section

* Additional formatting changes

* Make button text larger

* Minor copy changes to membership

* Update mentorship copy and style

* Adding trademarks.  fixes OperationCode#132.

* Revert Env changes.

* Disable loging in

* Removed Trademarks Fixes OperationCode#139

* Various styling fixes.  Fixes OperationCode#119, OperationCode#128, OperationCode#119, OperationCode#108

* Add react scroll to code schools - change imagecard back to space-around.  Fixes OperationCode#111

* Backwards compat

* Center some text

* Fix school card styles

* Add vertical padding for Section component

* Add code-schools to sideNav

* Removes links to #. Fixes OperationCode#149

* Adds external link check. Fixes OperationCode#147, fixes OperationCode#142

* Converts social media links to <a>. Fixes OperationCode#148

* Removing bold

* Only check for production mode for GA. Fixes OperationCode#143

* Make images wider - fix padding issues in FF.

* fix signup style on safari.  Fixes OperationCode#157.

* Allow users to submit a form with an enter keydown

* Removes a console log statement used during testing

* Adds route handling and fourOhFour component for 404 handling

* Styles the 404 page and adds a swtich to router to allow for wildcard routing to 404 page

* copy yarn.lock before yarn install

* Adds a basic gala page. Fixes #44

* Issue OperationCode#69 fixed heading font-size, border-style for mobile < 321px

* Restyled hamburder nav.

* Added textshadow and vertical space for landing headline / join button.

* Altered family pic to add background noise and a new overlay color.

* Changed landing hero image to smaller jpg.

* Added image for devices with width <760px (not implemented).

* Removed box around landing h1. Changed hero button to lowercase. Adjusted background image size for mobile.

* Removed h1 background completely, adjusted padding below h1.

* Reverting 1477051. Fixes OperationCode#176

* Fixes responsive header background image width

Expanded the width of the header background image so it fills in the blank margin at the 760px media query.

* Add RMOTR logo

* OperationCode#185 added sentry.io

* OperationCode#76 styled error message into ul on signup page

* OperationCode#76 changed font size on mobile devices

* Added Wyncode logo

* updated image to 200x200 kpg

* OperationCode#179 added oracle logo to assets folder

* OperationCode#179 added oracle logo to partners section

* OperationCode#179 converted png to jpg, updated image path

* add in code platoon into the components

* Move README to CONTRIBUTING

* Add licenses

* Adds backend target to easily run an instance of the backend. Fixes OperationCode#174

* remove backend dir

* Adds a button that opens Id.Me modal on the /thanks page

* Adds basic styling to id.Me button

* Create an Idme component which houses the button and popup logic of the Id.Me Auth flow

* Adds a wildcard route to handle the Id.Me auth redirect

* enable login

* Id.me Integration.

* fix git attributes file.

* Some mocking / testing for id.me

* Docker update

* ignore backend submodule

* Added bottom padding to landing h1.

* testing config.

* env variable work.

* docker updates

* id.me update

* updates.

* login stability.

* k8s support

* restore redirect in server.js

* idme update.  Use official idme troop image.

* Adds a button that opens Id.Me modal on the /thanks page

* Add a team scene and relevant starter files

* Write the route for team page into home.js

* Add service seals to our front-end image repo and add them to the team page

* Create teamCard component and starter files

* Build a team.json file containing every opcode member name and their role

* Add large header quote to match wireframe

* Add Air Force Reserve and USMC Reserve seals to images and team page

* Build staffCard component, add it to team.js with some styling

* Style staffCard and team.js

* Fix padding on staff card and remove strong tags in favor of spans

* Remove empty component instances

* Adds faq folder, files, and route

* Style the paragraphs and headline text for FAQ

* Create a question component inside FAQ for modularity

* Create and import questions.json into the faq scene

* Render question components for each question section, Add LinkButton and Link

* Include link buttons with scroll-to-top functionality

* Add conrad to board, split out team into a different section, include json in team section, and render a teamCard per person

* Clean up branch for merge

* Add email and location icon, create contact scene, add contact route, and add basic styles to contact component

* Further styling for the contact component

* Remove icons and add final styles for contact page

* Remove extra lines from contact.css

* fixed spelling in validation error

* Resolve OperationCode#195

* Fix scroll anchor references

* Ammend instructions for forking instead of direct contribution

* Resolve OperationCode#204 - Add Heap Analytics to evaluate Integration

* Add email and location icon, create contact scene, add contact route, and add basic styles to contact component

* Further styling for the contact component

* Remove icons and add final styles for contact page

* Remove extra lines from contact.css

* Convert tabs to spaces

* Remove unnecessary Router Link component

* Add react-icons library for FontAwesome usage

* Update global header font sizes

* Deactivate hyphenation when words wrap

* Remove unnecessary comment

* Implement requested changes and condense UI

* Fold lines for readability

* Fix OperationCode#215

* Add padding between footer logo and other footer aspects

* Create history scene and basic history component

* Add route for /history url

* Add all markup necessary for page

* Finalize desktop styling and markup for component

* Add mobile styles

* Adjust styling for teamCard component for clearer UI

* Add backend API integration to source team members

* Re-order section components and change background of teamCard to gray for better contrast against white section

* Remove rem-based padding from team component

* Remove rem-based padding from staffCard component

* Fix desktop and responsive styling to add padding to the bottom of final section component

* Convert tabs to spaces

* Create and implement QuoteBanner component

* Adds make target to build site

* Set build vars for production. Fixes OperationCode#228

* Increase font-size of 1rem from 16px to 18px

* Cut and paste content from team/ to about/

* Add and link route to /about

* Fix index.css to adhere to REM/Media Query usage

Also removed fixed font-size in <Heading> component.

* Make footer fully responsive after global stylesheet change

* Resolve #10 - Create About Us page

* Fixes ENV names for ID.me

* Convert tabs to spaces

* Create and implement QuoteBanner component

* Add TODO message for future refactoring

* Increase font-size of 1rem from 16px to 18px

* Cut and paste content from team/ to about/

* Add and link route to /about

* Fix index.css to adhere to REM/Media Query usage

Also removed fixed font-size in <Heading> component.

* Make footer fully responsive after global stylesheet change

* Resolve #10 - Create About Us page

* Add TODO message for future refactoring

* Fix linting error and add TODO notes

* Fix indentations

* Add code school scholarships to front page

* added a comma

* Restructure children of Section component and add responsive styling

* Removes about paragraph padding as indicated by @kylemh's TODO in about.css

* Add landscape media query to fix hidden menu on landscape

* Reduce menu list padding and reduce hamburger size

* Remove span tag from join NavItems function to remove the gap in the menu spacing, re-order rendering of NavItems function to top

* Change px to ems

* Fix formatting error

* Add fourth card to whatWeDo on front page

* Remove paragraph styling from codeSchools and partnerSchools, removing first sentence from codeSchools copy due to redundancy

* Move online schools and moocs into separate sections, remove content styling from section children paragraphs

* Remove children styling from sections, remove added padding from section children

* Remove unnecessary media queries

* Adds mutiple media queries to resize hero Image across different screen sizes

* Add media query to schoolCard to make codeSchools page more responsive

* Alter fotn sizes in mobile query for schoolCard

* Update FAQ and remove old links

* Refactor history and create <Timeline> component

* Fix ImageCard stylings to be perfectly responsive

* Fix styles around usage of ImageCard components in /code_schools

* Fix styles around usage of ImageCard components on landing

* Resize and crop  images

* Move each FAQ render into a section for modularity

* Re-write markup and css for responsiveness

* Adjust header size at 500px breakpoint, committing scope creep sin

* Add Kylems border to faqs, add key to faq renders

* add privacy policy

* remove privacyPolicy component, update footer link for privacy page, remove yarn from package.json

* Small changes to make the footer work

* Revert "Small changes to make the footer work"

This reverts commit 16fa05e.

* Add Rick to team page

Add Rick and change copy

* Specify host for cookie. Hopefully fixes OperationCode#266

* Redirect back to operationcode.org, not www.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants