You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@linkis.apache.org by GitBox <gi...@apache.org> on 2021/11/29 03:16:29 UTC

[GitHub] [incubator-linkis] saLeox opened a new pull request #1121: Get protocol from current request, remove hard code of 'http'

saLeox opened a new pull request #1121:
URL: https://github.com/apache/incubator-linkis/pull/1121


   ### What is the purpose of the change
   Given that there is an another outer Nginx, which enables HTTPS and forward request to Linkis Nginx, when Linkis front end calls the backend API, using the address from the ${window.location.host}, the protocol also need to align with the current request protocol, which can be gotten from ${window.location.protocol}. Otherwise, there will be a CORS error on broswer side as using https to request front end resources while using http to access backend API.  
   
   ### Brief change log
   - In front end file api.js, change the protocol from 'http' to current request protocol.
   
   ### Verifying this change
   (Please pick either of the following options)  
   This change added tests and can be verified as follows:  
   - Setup an outer Nginx, that enabled HTTPS, and forward requests to the Linkis Nginx, that just support HTTP. See whether request can reach the backend from broswer.
   
   ### Does this pull request potentially affect one of the following parts:
   - Dependencies (does it add or upgrade a dependency): (no)
   - Anything that affects deployment: (no)
   - The MGS(Microservice Governance Services), i.e., Spring Cloud Gateway, OpenFeign, Eureka.: (no)
   
   ### Documentation
   - Does this pull request introduce a new feature? (no)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org
For additional commands, e-mail: dev-help@linkis.apache.org


[GitHub] [incubator-linkis] peacewong merged pull request #1121: Get protocol from current request, remove hard code of 'http'

Posted by GitBox <gi...@apache.org>.
peacewong merged pull request #1121:
URL: https://github.com/apache/incubator-linkis/pull/1121


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org
For additional commands, e-mail: dev-help@linkis.apache.org