https-enforcement | Laravel 5 Middleware to enforce HTTPS on your application | HTTP library
kandi X-RAY | https-enforcement Summary
kandi X-RAY | https-enforcement Summary
An automatic piece of middleware for Laravel 5.x, which will redirect users accessing non https urls, to the secure equivalent unless specified in the ignore list.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Boot the application .
- Determine if the request is in an array .
- Handle the security check .
- Register package .
- Set exceptions .
- Get all exceptions .
https-enforcement Key Features
https-enforcement Examples and Code Snippets
Community Discussions
Trending Discussions on https-enforcement
QUESTION
We are running a couple of k8s clusters on Azure AKS. The service (ghost blog) is behind the Nginx ingress and secured with a cert from Letsencrypt. All of that works fine but the redirect behavior is what I am having trouble with.
The Ingress correctly re-directs from http://whatever.com to https://whatever.com — the issue is that it does so using a 308 redirect which strips all post/page Meta anytime a user shares a page from the site.
The issue results in users who share any page of the site on most social properties receiving a 'Preview Link' — where the title of the page and the page meta preview do not work and are instead replaced with '308 Permanent Redirect' text — which looks like this:
From the ingress-nginx docs over here I can see that this is the intended behavior (ie. 308 redirect) what I believe is not intended is the interaction with social sharing services when those services attempt to create a page preview.
While the issue would be solved by Facebook (or twitter, etc etc) pointing direct to the https site by default, I currently have no way to force those sites to look to https for the content that will be used to create the previews.
Setting Permanent Re-Direct CodeI can also see that it looks like I should be able to set the redirect code to whatever I want it to be (I believe a 301 redirect will allow Facebook et al. to correctly pull post/page snippet meta), docs on that found here.
The problem is that when I add the redirect-code annotation as specified:
...ANSWER
Answered 2018-Oct-02 at 23:31My guess is the TLS redirect shadows the nginx.ingress.kubernetes.io/permanent-redirect-code
annotation.
You can actually change the ConfigMap
for your nginx-configuration
so that the default redirect is 301. That's the configuration your nginx ingress controller uses for nginx itself. The ConfigMap
looks like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install https-enforcement
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page