How to FORCE_HTTPS on Cloud functions API endpoints

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to FORCE_HTTPS on Cloud functions API endpoints



I've configured a custom domain and certificate and hooked up the cloud functions api to my actions and this works fine.



Endpoints work over both https and http.



But I'd like to enforce https only. Something like "FORCE_HTTPS: true" in the static buildpack. Is there someway that I can do this?




1 Answer
1



You should get an X-Forwarded-Url header in the action itself that you could inspect to force HTTPS. Using that in conjunction with secure actions via the web_key annotation should make it enforceable.


X-Forwarded-Url



In the future, the API Gateway may be able to enforce this for you via the configuration specified in the Open API doc.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived